1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Formatting lists

Discussion in 'CSS' started by valandil, Jul 25, 2009.

  1. #1
    Hey guys,

    I have been looking everywhere about how to do this but still can't find it. Here's what I'm trying to achieve:

    I want to create a list using the <ul> tag. But I want the list's elements to be separated.

    For example, now it's like this:

    1. Example line1
      Example line2
    2. Example 2
    3. Example 3

    What I want:

    1. Example line 1
    Example line 2

    2. Example 2

    3. Example 3
    SEMrush

    Thanks for the help!
     
    valandil, Jul 25, 2009 IP
    SEMrush
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,499
    Likes Received:
    377
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Set {list-style-position: inside;}.

    cheers,

    gary
     
    kk5st, Jul 25, 2009 IP
  3. valandil

    valandil Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hey Gary, that's not what I mean. What I want to achieve is this:


    item 1
    item 1 line 2

    item 2
    item2 line 2

    item 3
    item 3 line 3


    As in the list items are grouped together and not all jumbled together. I hope that helps.
     
    valandil, Jul 25, 2009 IP
  4. kk5st

    kk5st Prominent Member

    Messages:
    3,499
    Likes Received:
    377
    Best Answers:
    29
    Trophy Points:
    335
    #4
    Give the li a top and/or bottom margin.

    gary
     
    kk5st, Jul 25, 2009 IP
  5. valandil

    valandil Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks! That's what I was looking for.
     
    valandil, Jul 26, 2009 IP