473,386 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Custom Server controls

Hi all,

Does anyone tell me how to set the width of a custom server control. Because
my server control comes in a small box forcing some of it's elements to jump
into new lines.

Thanks in advance.

Prasanna.
Nov 15 '05 #1
1 1179
I assume you're talking about ASP.NET. You can add an explicit width to an
html element by either setting the Width property on the control - if it
exposes one, or by manually adding the CSS (which Width translates to when
available).

myTopLevelElement.Attributes.Add("style","width:30 0px");

or you can add the Nowrap attribute to table cells which will stop the
contained text from breaking onto another line.

Or you can set an explicit width attribute on a table without having to use
css. <table width="400"> is 400 pixels. If there is CSS on top of that I
think it might override the html attribute, but I'm not 100% sure about
that.

hth
Leon
"Prasanna" <na**********@yahoo.com> wrote in message
news:#Y**************@tk2msftngp13.phx.gbl...
Hi all,

Does anyone tell me how to set the width of a custom server control. Because my server control comes in a small box forcing some of it's elements to jump into new lines.

Thanks in advance.

Prasanna.

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jay Walker | last post by:
I created a custom DataGridColumn based on Marcie Robillard's MSDN Article: Creating Custom Columns for the ASP.NET Datagrid...
3
by: Chris Newby | last post by:
I have a very simple custom control that derives from WebControls.Panel and implements INamingContainer. It appear that controls created as children of my custom control are having ViewState...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
11
by: Nick Gilbert | last post by:
Hi, How can I create a custom control which will wrap its content in a header and footer? eg: Is it possible to create a .NET user control which can surround other controls? eg:...
4
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.