SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    Northern CA, USA
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    problem centering <ul>

    problem centering <ul>

    Would someone please explain why this <ul> properly centers in Mozilla, but displays somewhat right of center, with annoying left whitespace, in IE5.5 WIN? How can I do this properly?

    css :

    body {margin: 0; padding: 0; text-align: center;}
    ul {margin: auto; padding: 0;}
    li {margin: 0; padding: 0;}

    html :

    <ul>
    <li>list item</li>
    <li>list item</li>
    <li>list item</li>
    </ul>

    I have searched, I have read, I have tried container div.
    Links to relevant basics are appreciated.

    Thank you for your patience, albion7

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    Northern CA, USA
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've discovered the answer myself!

    IE5.5 chokes on:

    ul {margin: auto; padding: 0;}

    but changing this to:

    ul {margin-left: auto; margin-right: auto; margin-top: 0; margin-bottom: 0; padding: 0;}

    Solved the problem.

    HTH someone!

    albion7


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
  •