- Impact
- 0
Hi,
I am trying to make a drop down menu using only CSS. I want to be able to set the width of the menu and don't want the width to be dependant of size of the menu option (width of the phrase). Also, is it possible to control the height of the menu?
This is the XHTML code (I am using 1.0 strict):
<div class="option">
<form name="navigation">
<select name="selectname" SIZE="1">
<option class="">not wide enough</option>
<option class=""></option>
<option class=""></option>
<option class=""></option>
</select>
</form>
</div>
And the CSS part:
div.option
{
position: absolute;
top: 10px;
left: 0px;
width: 520px;
height: 50px;
z-index: 3;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 10px;
}
I am trying to avoid Javascript, but if this is not possible with CSS can someone tell how to do it with Javascript?
I am trying to make a drop down menu using only CSS. I want to be able to set the width of the menu and don't want the width to be dependant of size of the menu option (width of the phrase). Also, is it possible to control the height of the menu?
This is the XHTML code (I am using 1.0 strict):
<div class="option">
<form name="navigation">
<select name="selectname" SIZE="1">
<option class="">not wide enough</option>
<option class=""></option>
<option class=""></option>
<option class=""></option>
</select>
</form>
</div>
And the CSS part:
div.option
{
position: absolute;
top: 10px;
left: 0px;
width: 520px;
height: 50px;
z-index: 3;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 10px;
}
I am trying to avoid Javascript, but if this is not possible with CSS can someone tell how to do it with Javascript?













