PDA

View Full Version : Set the height of a drop down



ismailc
10-30-2008, 10:42 AM
Hi,

Is there a way of setting the height of a drop down box?
I could manage this by setting the font-size but have to set it really big to get the height of the drop down to increase!

I posted in CSS, but would like to know if there is a script that could help

Please Assist!

Nile
10-31-2008, 01:31 AM
I'm guessing you mean a select box, the code to do this for every option would be this:


<html>
<head>
<title>Select Box</title>
<style type="text/css">
.a option {
height: 50px;
}
</style>
</head>
<body>
<select class="a">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
</body>
</html>

ismailc
10-31-2008, 06:20 AM
Thank you - I thought this was not possible ...

magicyte
11-02-2008, 02:33 AM
Alternative:


<html>
<head>
<title>Select Box</title>
</head>
<body>
<select size="3">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
</body>
</html>

The highlighted code may be changed to fit your wants/needs. This is the height of the box after it is dropped down. I don't know if this is what you wanted or not. You can also use margin:


<html>
<head>
<title>Select Box</title>
</head>
<body>
<select style="margin:20px;">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
</body>
</html>

The highlighted code may be changed, again. This will do something. Test it out.

-magicyte

ismailc
11-02-2008, 07:15 AM
Thank You for the help - I'm happy with the first result.
Increase the height of the input box of the text box.