Results 1 to 5 of 5

Thread: Default top margin, 1px difference in Firefox & IE

  1. #1
    Join Date
    Feb 2009
    Location
    Bolton, NW England
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Default top margin, 1px difference in Firefox & IE

    Hi,

    First post on here!

    ...I have a problem with the default margin in IE being 1px less than Firefox. I've stripped my CSS down to be as naked as possible!

    It's quite frustrating as I'm quite experienced with CSS, I guess the small silly things do things like this when you've not been CSS'n for a few months!

    HTML:- (Just the typical HTML you start with)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <link rel="stylesheet" href="style.css" type="text/css" />
    </head>
    <body>

    test

    </body>
    </html>



    CSS:-

    * { margin: 0; padding: 0; }
    body { margin: 0; padding: 0; }

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Quote Originally Posted by Jay661 View Post
    I've stripped my CSS down to be as naked as possible!
    You sure did! There's not really anything to work with. Could you post a link to your site or give us more code?

  3. #3
    Join Date
    Feb 2009
    Location
    Bolton, NW England
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    haha... incase that got mis-understood, I stripped the CSS down and it STILL gives the 1px extra problem with the code you see. I've attached the .html and .css into a .ZIP incase any of you want to have a play with it.

    Thanks for the fast response as well!

    ...by the way, I currently don't have a domain registered to upload this to.

  4. #4
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    I'm sorry but I see no difference in margin and looking at the code I shouldn't since it's all fine. What version of Fx and IE are you using? Could you also please post a screenshot showing the difference?

  5. #5
    Join Date
    Feb 2009
    Location
    Bolton, NW England
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry for taking so long to reply to my own thread! I've done a tiny bit more coding to see if it would sort itself out, I updated Firefox and IE to the latest versions, I've also tested the code on a completely different PC with the same and different versions of IE and Firefox and the results are all the same...

    I've attached the code so far along with a small screenshot of the difference... but please note, even though there's some extra code chucked in there it doesn't affect it by the looks of it as I've tried it with next to no code!

    I could be pikey and use the expression('') hack to fix it in IE, but I'm too in love with valid CSS! )

    The gap just won't go!

    Thanks

Bookmarks

Posting Permissions

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