CSS Spacers
July 23, 2004 4:53 AM Subscribe
Hey, CSS Cowboys - spacer help needed! Look
here. This is a simple box with three different backgrounds in three fields with no content; the first two need to be exactly 100 pixels tall, and the last one needs to be 200 pixels tall. I am making this happen with transparent spacer .gifs, but I want to eliminate them, if possible. I've tried a couple of things (spacer tag, fer example) that work in Mozilla but not IE; and a couple of things that work in IE (span tags with height declaration, fer example) but not in Mozilla. Padding doesn't work well in either for exact spacing. Can you help me conquer space, the final frontier?
posted by taz to computers & internet (5 answers total)
Make sure your HTML validates before you try to work out CSS bugs. validator.w3.org.
Make sure your background image containers' css have both padding: 0; and margin: 0; - some browsers default is different than 0.
posted by tomierna at 5:34 AM on July 23, 2004