SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot biggie2's Avatar
    Join Date
    Feb 2006
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why are margins doubled in IE6 and IE7?

    I'm getting far bigger margins in IE6 and sometimes IE7. For example, on this page, in IE6, the margins for my content is too far down from the banner. Looks fine in Firefox.

    Or that the sidebar margins are too close in IE6 and too far away in FF.

    Or on this page, the margins for my header text are to far to the right in the four little boxes for IE7. What am I doing wrong?

    Argghhh....so frustrating.

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    There are two things with margins to consider.

    1. Each browser has different default margins. If you don't specify [b]* {margin:0;}[/p] (or some other margin size then you need to specify margins on everything (the same goes for padding).

    2. IE has a double margin bug when floating elements. This is corrected by adding display:inline to floated elements.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •