...

View Full Version : css and firefox



mbarath
02-19-2005, 07:46 PM
I just started using Firefox to test my css and of course Iíve been surprised. And of course I wish I had done it earlier.

If you look at http://justustwo.com/test_pos_para.htm in Firefox youíll notice that text (inside <p> tags) is not rendered precisely inside the <div> tags in which they are contained. When rendered, a line break is inserted pushing the text down from where I would expect it to be. Look at the source to see how it is set up.

But in my css, if I add

p{ margin:0; padding:0; }

it renders as I expect: http://justustwo.com/test_pos.htm

Has anyone else had issues like this? Is this something Iíll have to be aware of from now on when using nested block level elements? Comments, please?

The same thing happens in NN7, but not in IE6.

Thanks, MB

Jalenack
02-19-2005, 07:52 PM
yes, that is how it should behave. <p> tags, as well as a lot of block-level elements, have default margins/padding. One excellent trick is Mindless Lemming's Global White Space Reset (http://leftjustified.net/journal/2004/10/19/global-ws-reset/) . It basically sets every item on your page to have no default margins or padding, which tend to vary from browser to browser.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum