473,382 Members | 1,814 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,382 software developers and data experts.

How to apply a minimum width to a control

Hi everyone.

How can I assign an initial width to a "DIV" or "select box"? I want my select box to appear using this width, but expand if its contents are wider than the given with.
If I don't give it a width, it will resize all right. But then it will appear at a random width initially, which is pretty ugly in the page that I work with.

Thank you,
kmobarra
Sep 5 '08 #1
1 1867
numberwhun
3,509 Expert Mod 2GB
Well, in your style sheet, you could try setting the "min-width" attribute, but I don't think it works across all browsers. Not to reference another site, but I found that tidbit here .

Regards,

Jeff
Sep 5 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: chrisc22 | last post by:
Hi, I have a problem that goes something like this: I want to determine the minimum height that a label control can have, given an arbitrarily long string, that will make all text visible, with 0...
1
by: Wilfried Mestdagh | last post by:
Hi, If you doubleclick on a dbgrid title separator the column automticly resize to his minumum width. How to do this in code ? -- rgds, Wilfried http://www.mestdagh.biz
2
by: Chuck Bowling | last post by:
I'm trying to figure out how I can get the minumum height required for a textbox containing a string in a given font with a set width and also the converse, the minimum required width of a textbox...
2
by: Crystal | last post by:
Hi there, I am converting ASP pages to asp.net pages. The orignal anchor is: <a class="nohover" href="..."> < img src="..." height="30" width="30" border="0"></a> I create an asp:hyper link for...
2
by: John Mason | last post by:
Hi, I have a Datagrid control with an edit command column, which has a PushButton ButtonType. I am trying to apply formatting to the plain grey button, to make it look more appealing on...
0
by: jdeleon0526 | last post by:
Hi All, I have datagrid with formated columns and I want to edit and save the changes interactively while viewing the grid. What am I my doing wrong or can you please correct my code below. ...
3
by: shawnews | last post by:
Hi, I try to apply a simple tag to an image like that: <td><img src="../images/lower-left-corner.png" alt="lower-left-corner" width="26" height="19" class="right-middle" /></td> the css-tag...
2
by: cshaw | last post by:
Hello Everyone, I am having problems with a listbox control. I have a page with a couple of labels and drop-down lists at the top, and then below there is a table with two columns, the first column...
3
by: moondaddy | last post by:
I have a wpf app and need to apply a control template to a thumb at runtime, but I can't do it the same way I would apply a style. this is what I want to do: Thumb thm = new Thumb();...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.