SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict trigger's Avatar
    Join Date
    Jun 2003
    Location
    Eagan
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    why the heck would defining my body margins in css mess everything up?

    I'm so confused as to what I did wrong. I changed my body tag to read
    just
    <body>
    so I don't have the non-validating marginwidth properties and such. I still wanted to not have any margin in the browser window so in my linked stylesheet, so I did

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

    }
    which should have worked. It did, but seemed to mess up a few things, like my navbar (systems, storage, networking) isn't centering in the navcontainer anymore, despite the

    ul#navlist
    {
    white-space: nowrap;
    list-style: inline;
    padding: 0;
    margin: 0 auto;
    width: 100%;
    font-size: 0.7em;
    text-align: center;
    }

    coding, and the logobar (the four logos at the top) doesn't have the four left borders with uniform height anymore as well, despite the height of 100% on the ul, li and li a selectors

    Is there something wrong with my syntax, or is there something seriously wrong with my css, or should I got back to the old bodytag with the marginwidth right in the code?

    html: http://www.nasi.com/test.htm

    css: http://www.nasi.com/test/style.css

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Code:
    list-style: inline;
    Should probably be
    Code:
    display: inline;

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    The reason everything is changed is because I notice that you have removed the xml prologue (<?xml version="1.0" encoding="iso-8859-1"?>).

    This means that your page is now rendering in standards mode in IE6 as opposed to quirks mode.

    (I'm assuming you are using IE6 as your page does not display correctly in Mozilla anyway.)

    If you want to change to standards mode at this stage it will probably result in having to make quite a number of changes.

    Paul


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
  •