SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: ol ul indent

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ol ul indent

    Hi

    Some of the text on a few of my bullet points carry over multiple lines, but its not maintaining its indentation as seen here:

    http://cg.vu-creative.com/nomination/instructions.asp

    Can anyone spot where i have gone wrong please?

    Thanks

  2. #2
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,882
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    text-indent only applies to the first line of the element (think about how paragraphs used to be indented on the first line, back in the days of typewriters, and often still are in books). To get subsequent lines indented, you should use margin-left instead.

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,121
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Yes, use left margin instead of text-indent. However, if you want the effect as seen on the page you linked to (with the first line extending further left than the rest of the text), use left margin, and then a negative text indent to pull the first line to the left.

    Code:
    ul {margin-left: 50px; text-indent: -30px;}
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."


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
  •