Monday, July 28, 2008

Whitespaces and Display:None Tags

Normally, if you've got multiple occurrences of a whitespace in HTML, it gets converted to a single whitespace. However, if you add a couple of HTML tags with the CSS attribute display set to none, the spaces in the HTML document increase.

I find the behavior a bit odd, considering that the display: none isn't supposed to effect the layout of items, or so we would like to believe.

No comments: