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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Feb 2004
    Location
    UK, derby
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS and line spacing in a <li>

    Hi

    I have a classic CSS:-

    ul.none {
    FONT-SIZE: 70%;
    line-height: 10pt;
    COLOR: #000000;
    list-style-position: intside;
    list-style-type: none;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    position:relative;
    width:150px;
    padding:10px;
    text-align:center;
    BACKGROUND-COLOR: #EDF5F5;
    border: 1px solid #0000000;
    }

    AND THE HTML:-

    <ul class="none">
    <li>NEWS 1</li>
    <li>NEWS 2</li>
    <li>NEWS 3</li>
    <li>NEWS 4</li>
    <li>NEWS 5</li>
    </ul>

    I want to have a larger gap between each <li> item, without using a <p> or a <br>?

    Line height or spacing does not work, it spaces out everything. E.g if the text in the <li> is longer than a line it makes this line higher, which means it looks well daft if you see what i mean. because everything is so spaced out.

    Margin and Padding do not work for what i wish to achieve.

    Could anyone Help please.

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts

    Re: CSS and line spacing in a <li>

    Originally posted by jakenoble
    Margin and Padding do not work for what i wish to achieve.

    Could anyone Help please.
    Have you tried using margin or padding for <li> instead of <ul>? i.e. "li {margin:10px 0}"

    That's usually the way I handle it when I need list items separated...

    -Rich


  •  

    Posting Permissions

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