• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

SELECT dropdown -- limit width of box, but allow OPTIONs to be full width

Apologies if this has been answered previously--I couldn't find a reference.

I am writing for IE6, and want to create a SELECT menu that is of fixed width, yet when clicked allows the drop-down menu to expand to the width of the longest OPTION.  I'm guessing that overflow: auto fixes this in Netscape, but that doesn't work for me.  Is the only solution to make my own menu?

Thank you,

Rob
0
roblinx
Asked:
roblinx
  • 3
  • 2
2 Solutions
 
aprestoCommented:
to control the width you can use CSS and it will be respected by most modern browsers. Just put this in the head of the page:

<style type="text/css">
select {width:100px"}
</style>

Of course if any of the options are wider than the specified width they will get cut off.

As for the bold, you can change the font-weight for the select but not the individual options. the only styling you can use for options is the color and background color.  So you cond do something like this for an option you want to stan out:

<option style="color:red">your text</option>


answer from Cd& - (Give credit where it is due)
0
 
aprestoCommented:
roblinx did this help?
0
 
dij8Commented:
Yes you will need to create your own menus.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
roblinxAuthor Commented:
apresto, your answer was valid, but I didn't phrase my question well, so it didn't quite get what I was looking for.  dij8's answer, unfortunately, seems to be correct:  I can't do what I want to do with stock objects for IE--I'll have to make my own.

I'll just split the points between you, since you were good enough to read my question and give an answer.  Thank you!
0
 
aprestoCommented:
Thanks roblinx, sorry it wasnt quite what you were looking for.  Hope you sort it out
0
 
dij8Commented:
If it's a navigation menu you are looking for there are a multitude of them around the Net. www.dynamicdrive.com always has a few.  A search on Google will find the rest.  I'd recommend finding one that uses mostly CSS and no tables.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now