Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to control the width of drop down list

Status
Not open for further replies.

roblasch

Programmer
Dec 30, 2000
168
US
Is it possible to control the width of a drop down list? I have been able to do it in IE, but not without destroying the entire list in NS4.x. I could live with not controling it in NS, but it at least has to remain a drop down box. Thanks
 
use the style attribute like as
<html>
<BODY>
<form>
<select name=&quot;combo1&quot; style=&quot;width:100&quot;>
<option>aaaaaaaaaaaaaaaaaaaa</option>
<option>bbbbbbbbbbbbbbbbbbbb</option>
<option>cccccccccccccccccccc</option>
<option>dddddddddddddddddddd</option>
</form>
</BODY>
</html>

I checked this one in IE and Netscape6.0. It is working fine. Netscape4.x is not available to me.So I didn't check this code in Netscape4.x.

Please try with style attribute.
 
That is what i did, and you lose the entire drop down in NS4.x. This is a comercial site and that would not do
 
I've never tried Netscape, but I think I've heard that putting

width=&quot;100&quot; style=&quot;width:100;&quot;

in the <select> tag makes it cross-browser.
Sorry I can't test it, but I think it should work.
Rick
 
hi,

this is my page (under development) it uses select with bgcolor and width. bgcolor and width show in ie and ns6. in ns4 and opera it still shows the select menu however without the bgcolor


my css for achieving this is in a style sheet

select { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #3f557f; background-color: #79a1f2; width: 200px} Ranjan
:: I earn because I learn ::
 
Ranjan,

This is off topic but I thought I would mention it anyway..

I would be careful when you are using a dropdown as your only method of navigation around your site.

If a search engine hits your page, most of them (if not all) will not be able to read the links in the menu.

Hope this helps Wullie

 
bluranj,

This is totally no-related to this post, but how did you get your drop down menu to scroll with the page like that?
[deejay]
Nate
&quot;If you're not living on the edge, you're taking up too much space!&quot;
 
as i said the page is under development and by no means complete. all that space next to the logo is for text navigational links !!!! thanks tough. scrolling that navigation was done with a dreamweaver extension called persistant layers. it can be found here


if you do not have dreamweaver, i can send you the code
Ranjan
:: I earn because I learn ::
 
I do have dreamweaver, but I don't use it. I prefer to type the code out traditionally. You can do more by knowing the code.

Could you send me the code.
nate_amies@hotmail.com
Thanks [deejay]
Nate
&quot;If you're not living on the edge, you're taking up too much space!&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top