Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Feb 2009
    Location
    South Africa and USA
    Posts
    63
    Thanks
    30
    Thanked 0 Times in 0 Posts

    Spacing in <ul> list

    How do I add space between the first and second line in one item on a <ul> list. Following is an example of my problem:

    • Doesn’t allow feelings to control their actions.
      They do what they should do even when they don’t feel like it, at least most of the time.


    Both the above lines are part of the same item on a list but I need space between these two lines.

    How do I achieve that?

    My CSS code for ordered and unnumbered lists is:

    Code:
    #contentleft ol {margin: 0px 0px 0px 20px; padding: 0px 0px 10px 0px;}
    #contentleft ol li {margin: 0px 0px 0px 20px; padding: 0px 0px 5px 0px;}
    #contentleft ul {
      list-style-type: square;
      margin: 0px 0px 0px 20px;
      padding: 0px 0px 10px 0px;
    }
    #contentleft ul li {
      list-style-type: square;
      margin: 0px 0px 0px 20px;
      padding: 0px 0px 5px 0px;
    }
    You can see the problem illustrated here.

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Not sure which section of your page you're talking about. Can you elaborate please?

    If you're talking about the #content p{}, then you could just add top padding to that css declaration of say 10px.

    Ok nevermind, I reread your question and saw your example here and on your page. Yes try this:

    Code:
    #content p {
        line-height: 20px;
        margin: 0;
        padding: 10px 0;
    Last edited by teedoff; 07-01-2011 at 03:48 PM.
    Teed

  • #3
    New Coder
    Join Date
    Jun 2011
    Posts
    46
    Thanks
    1
    Thanked 2 Times in 2 Posts
    I think you're wanting to work with line height. Something like this is probably your best bet: http://www.w3schools.com/cssref/tryi...ss_line-height

    I think you could add it in either the ul or li tag, but you'll have to double check that. I've never tried it.

  • #4
    New Coder
    Join Date
    Jun 2011
    Posts
    46
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Sorry, just saw the line-height variable in there. Not sure if you edited that after or if I just missed it.
    Last edited by kwdamp; 07-01-2011 at 04:39 PM. Reason: Mistake


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •