Spannah in the works

Wednesday, July 11, 2007

Unwanted vertical space between block elements

Just a note really about the appearance of extra vertical space between block level elements in IE6. Most annoying as it seems hard returns in the HTML code can cause this. I can get quite uptight if I can't lay out my code the way I like to, so having to break elements mid-tag gets me a little on edge. The times I find this occurs, is when you apply a style 'display: block' to an anchor tag within a list item:



If you find you get the insertion of vertical space between the list item tags, then try removing the hard returns, or if you're uptight like me and hate to work with code on one line, then:



ooh it still sets my teeth on edge, but more managable!!