SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why doesn't a list push all the way to the left?

    Hi all,

    I am a newbie doing a site from scratch with xhtml and css. I have an unordered list with standard disc bullets and I don't understand why there is a larger gap between the left edge of the browser window and the bullets? I haven't applied any positioning to it yet but it is still indented more than any other element. Is there any way to fix it?

    Jon

  2. #2
    SitePoint Wizard LiquidReflex's Avatar
    Join Date
    Aug 2003
    Location
    Minnesota
    Posts
    1,861
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    By default, the old standard for lists was to indent them a certain distance. If you don't define a left margin in CSS, it will use the default (which is a large left indentation).

    To change it you can use CSS and settings like this (you can adjust the values to the spacing of your choice):

    HTML Code:
    ul
    {
    margin-left: 0;
    }
    li
    {
    margin: 0;
    padding: 0;
    }
    Kevin Hauge : Modern Leaf Design : Follow Us on Facebook
    Client Axis v.08 - client / project management script

  3. #3
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, so simple. Thanks Kevin!


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
  •