How can i format ul / li tags in css?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cherliloo
    New Member
    • Aug 2008
    • 1

    How can i format ul / li tags in css?

    How can i format ul / li tags in css?
    I'm not sure if it's possible to even format this. But here goes.
    "_" represent empty space .
    when i make a list on the web, it looks like this
    Code:
    -main text (ul)
               - sub text (li)
               - sub text (li)
    But i would like the sub text to flush closer to the main text above it. Like so:
    Code:
    -main text
      - sub text
      - sub text
    Is there anyway of implementing this in css?

    I was told by adding would help but it didin't work for me.
    Code:
    padding-left: 0.5em;
    Any advise is appreciated :)
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    You also have to take the margin into account. Also make sure you're using a strict doctype.

    Comment

    Working...