Log in

View Full Version : Resolved select box width



traq
11-23-2010, 02:39 AM
does anyone know how to set the width of a <select> box, including the drop-down button? For example,

select{ width: 150px; }
creates this,
http://www.custom-anything.com/sand/sel180-1.png
but I want this
http://www.custom-anything.com/sand/sel180-2.png

thanks!

Nile
11-23-2010, 02:48 AM
What browser are you using? These have the same width on a Mac and a Windows in IE, Chrome, FF, and Opera.


<style type="text/css">
#box { width: 200px; height: 5px; background: blue; }
select { width: 200px; }
</style>
<div id="box"></div>
<select>
<option>SELECT</option>
</select>

traq
11-23-2010, 03:30 AM
hmmm... crap. I must've made a typo somewhere in my original code. it works as expected now, though my original markup doesn't. debug time!

thanks

Nile
11-23-2010, 03:34 AM
No problem.