Saturday, February 2, 2008

IE 6 Hidden Inputs

There are often times when you need to use hidden inputs, whatever the reason is. As the name suggests, these are hidden inputs, and should NOT be displayed.

However, as usual, IE 6 decides to go against common sense and do something strange. In this case, IE 6 seems to reserve some space for hidden inputs. You end up with odd blank spaces here and there, depending where you put your hidden inputs.

It took me a while to figure out it was the hidden inputs (after pulling out my hair several times). I used a very simple hack to get rid of them afterwards:

position: absolute;
left: 9999px;

That zips the hidden inputs off the page and out of sight, even in IE 6!


W

No comments: