SitePoint Sponsor

User Tag List

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

    HTML list without margin

    Hi coders!

    I would like to parameter a HTML list, (<ul>)
    the aim is to delete completely the inside margin,
    i want my itemlist, subitemlist, subsubsitemlist, etc... (<li>)
    at the same left level.
    This aspect :

    item
    subitem
    subsubitem

    instead of :

    item
    ---subitem
    ------subsubitem

    ("-" means a space.)

    Thamx for your help, Sylvain.

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    ul {
      margin: 0;
      padding: 0;
    }
    These three articles explain how to style lists.
    http://www.alistapart.com/articles/taminglists/
    http://css.maxdesign.com.au/listutorial/
    http://www.webreference.com/programming/css_lists/

    And this one explains a fix for a common IE bug:
    White space bug revisited--the definitive fix
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Location
    DK
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Margin is used by IE.
    Padding is used by FF.

    So use them both!


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
  •