By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,302 Members | 1,788 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,302 IT Pros & Developers. It's quick & easy.

Excess vertical space below a <SELECT>

P: n/a
Hi --

I have a table cell in which is placed a <SELECT> tag. The drop-down box has
an excessive amount of whitespace below it, forcing the cell to adjust its
height to accommodate this extra space. The <SELECT> includes a "class="
attribute to a stylesheet definition that is currently empty.

How do I get rid of this dead space below the drop-down box?

Thanks,
CL
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Charles Lavin wrote:

I have a table cell in which is placed a <SELECT> tag. The drop-down box has
an excessive amount of whitespace below it, forcing the cell to adjust its
height to accommodate this extra space. The <SELECT> includes a "class="
attribute to a stylesheet definition that is currently empty.
empty stylesheets cause problems. In IE 5/Mac, it causes the browser
to hang without ever rendering the html/css.
How do I get rid of this dead space below the drop-down box?


I don't know if it will help (probably not). But put in the otherwise
empty stylesheet

body {font-size: 100%}

It does no harm, and may correct a but in MSIE/Win. And it corrects
the IE/Mac bug.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #2

P: n/a
Hi --

Putting in the {font-size:100%} didn't help. And completely taking out the
stylesheet definition didn't help either.

Thanks,
CL

"Brian" <us*****@mangymutt.com.invalid-remove-this-part> wrote in message
news:gWJ5b.352188$Ho3.52674@sccrnsc03...
Charles Lavin wrote:

I have a table cell in which is placed a <SELECT> tag. The drop-down box has an excessive amount of whitespace below it, forcing the cell to adjust its height to accommodate this extra space. The <SELECT> includes a "class="
attribute to a stylesheet definition that is currently empty.


empty stylesheets cause problems. In IE 5/Mac, it causes the browser
to hang without ever rendering the html/css.
How do I get rid of this dead space below the drop-down box?


I don't know if it will help (probably not). But put in the otherwise
empty stylesheet

body {font-size: 100%}

It does no harm, and may correct a but in MSIE/Win. And it corrects
the IE/Mac bug.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #3

P: n/a
Please don't top-post. Please do edit the quoted material.

Charles Lavin wrote:
I have a table cell in which is placed a <SELECT> tag. The
drop-down box has an excessive amount of whitespace below it,
forcing the cell to adjust its height to accommodate this extra
space. The <SELECT> includes a "class=" attribute to a
stylesheet definition that is currently empty.


empty stylesheets cause problems. I don't know if it will help
(probably not). But put in the otherwise empty stylesheet

body {font-size: 100%}


Putting in the {font-size:100%} didn't help. And completely taking
out the stylesheet definition didn't help either.


Please supply a url so that we may help you.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #4

P: n/a
> I have a table cell in which is placed a <SELECT> tag. The drop-down box has
an excessive amount of whitespace below it, forcing the cell to adjust its


Set "margin: 0px; padding: 0px" on the <form> definition inside the
table - or move the opening and closing <form> tags so that the table
is inside it.

One other tip. In a <div> version of a table in which I put my own
<select>, I noticed that any text to the left of the <select> would be
vertically top-aligned with the <select> control itself. I couldn't
get the <select> control to move up vertically so that things were
vertically centered. I ended up having to do the following:

<select style="margin-top: -22px; margin-bottom: 2px">

Yes, that's right. It's a complete hack and neither one of those
declarations has any right to work as it does. In IE, it's the
"margin-top" that moves it up. Anything < 22 doesn't do anything,
whereas when I changed it from 21 to 22 it suddenly starting moving
up. (IE ignores the "margin-bottom".) Mozilla, on the other hand,
ignores the "margin-top" and pays attention to the "margin-bottom".
Although, why using margin-bottom to move the control up (rather than
add an actual margin at the bottom) eludes me.
Jul 20 '05 #5

P: n/a
> I have a table cell in which is placed a <SELECT> tag. The drop-down box has
an excessive amount of whitespace below it, forcing the cell to adjust its


Set "margin: 0px; padding: 0px" on the <form> definition inside the
table - or move the opening and closing <form> tags so that the table
is inside it.

One other tip. In a <div> version of a table in which I put my own
<select>, I noticed that any text to the left of the <select> would be
vertically top-aligned with the <select> control itself. I couldn't
get the <select> control to move up vertically so that things were
vertically centered. I ended up having to do the following:

<select style="margin-top: -22px; margin-bottom: 2px">

Yes, that's right. It's a complete hack and neither one of those
declarations has any right to work as it does. In IE, it's the
"margin-top" that moves it up. Anything < 22 doesn't do anything,
whereas when I changed it from 21 to 22 it suddenly starting moving
up. (IE ignores the "margin-bottom".) Mozilla, on the other hand,
ignores the "margin-top" and pays attention to the "margin-bottom".
Although, why using margin-bottom to move the control up (rather than
add an actual margin at the bottom) eludes me.
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.