Results 1 to 6 of 6

Thread: Simple list question.

  1. #1
    Join Date
    Jan 2007
    Posts
    181
    Thanks
    5
    Thanked 3 Times in 3 Posts

    Default Simple list question.

    I know this is a beginner question and I am almost embarrassed to ask it, but here it goes..

    Heres my situation:

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam lorem metus, pulvinar vel, ornare eget, semper non, arcu. Sed at tortor. Vestibulum ut massa. Aliquam quis leo.
    <ul>
    <li>bullet one</li>
    <li>bullet two</li>
    </ul>

    How do i eliminate the space between the paragraph and my bullet points (the ul tag)?

    Again, I'm sure this is a simple know-how but for some reason i don't recall how to do it.

    thanks,
    Jon

  2. #2
    Join Date
    Nov 2007
    Location
    USA
    Posts
    170
    Thanks
    8
    Thanked 22 Times in 22 Posts

    Default

    Well since a <ul> is a block element it is going to automatically create a line break where you insert it. You can add CSS to make it in a line:

    Code:
     display: inline;
    Do you want the items to go down vertically or do you want them horizontal?

  3. #3
    Join Date
    Jan 2007
    Posts
    181
    Thanks
    5
    Thanked 3 Times in 3 Posts

    Default

    Vertically is fine - i just need to eliminate the spacing between the paragraphs above and below the list.

    if i do it like this: <ul style="display:inline"> it just floats left but not up.

  4. #4
    Join Date
    Nov 2007
    Location
    USA
    Posts
    170
    Thanks
    8
    Thanked 22 Times in 22 Posts

    Default

    You could just add a negative margin in your <ul> like this:

    Code:
    <ul style='margin-top: -15px;'>

    I think that might be what you're looking for.

  5. The Following User Says Thank You to Moshambi For This Useful Post:

    Jon101 (10-14-2008)

  6. #5
    Join Date
    Jan 2007
    Posts
    181
    Thanks
    5
    Thanked 3 Times in 3 Posts

    Default

    Works like a charm.

    Thanks much, friend.

  7. #6
    Join Date
    Nov 2007
    Location
    USA
    Posts
    170
    Thanks
    8
    Thanked 22 Times in 22 Posts

    Default

    Glad to have helped

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
  •