View Full Version : Big bug in gecko enable browsers!

02-02-2005, 10:45 AM
I've noticed a big bug in gecko browsers i.e Firefox.

Try this and you will notice that the scrollbar shows even though the div is hidden. Solutions?? Suggestens?? The only solutions I got is thatyou have to leave the size NULL and in the function that toggles visibility you have to set the size propety.

<div style="visibility: hidden">
<select size="4">
<option value="">Option 1</option>
<option value="">Option 1</option>
<option value="">Option 1</option>
<option value="">Option 1</option>

What is the CSS equivalent of attribute SIZE in a select????



02-02-2005, 11:38 AM
Use "display: none" instead of "visibility: hidden"

P.S. I don't think there is a "size" equivalent in CSS... it's valid anyhow if you need to use it

P.P.S. Welcome to the forums :)

02-02-2005, 01:07 PM
No bug; "visibility: hidden;" means the element is not visible; it does however take up the same room in the document flow as if it were, including a scrollbar.
As Richard (rmedek) already indicated, to remove an element from the flow completely, use "display: none;".

02-03-2005, 09:21 AM
You are right! It works.
Thanks a lot. I sure looked like a bug because it was not visible in some browsers but in others and only when you put the size propety of a select box.

Well thanks again!