Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: css and firefox

  1. #1
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    css and firefox

    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

  • #2
    Regular Coder
    Join Date
    May 2004
    Location
    Berkeley, California Age: 15
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 . It basically sets every item on your page to have no default margins or padding, which tend to vary from browser to browser.
    Jalenack.com .:. YWDA Founder .:. Rounded Corners Maker 1.1! .:. My Blog
    The hardest thing about teaching is not knowing the right answers, but knowing the right questions - Elisabeth Klein
    Pretty buttons does not a great website make.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •