Get a free trial // Grow your CSS skills // Land your dream job

Top Margin in IE8

  • # February 17, 2010 at 4:04 pm

    I am using the following CSS for the body and container of my web site

    body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    color: #000000;
    background-color: #FFF;
    .twoColFixRtHdr #container {
    width: 1080px;
    margin: 0 auto;
    text-align: left;

    When I view the site in IE8 there is a margin at the top of the page, but when I view in IE6 or IE8 (Compatability Mode) the margin isn’t there.

    Any thoughts or suggestions would be greatly appreciated.

    If you want to view the site

    # February 18, 2010 at 6:30 am

    Add this to your CSS

    margin: 0;
    padding: 0;
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed