SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2010
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    No space wanted between heading and list

    Below is my code for an html email.

    <span style="font-family:Arial, Helvetica, sans-serif; font-size:13px; font-weight:bold;">Data analysis including/span>
    <ul><li>Reports back to 1997</li>
    <li>Total U.S. spending</li>
    <li>Rankings of more than 900 books</li>
    <li>Top 200 books</li>
    </ul>

    When it appears on screen I get a space between the heading "Data analysis including" and the bullet list. Like so:

    Data analysis including:

    • Reports back to 1997
    • Total U.S. spending
    • Rankings of more than 900 books
    • Top 200 books

    How can I write code to avoid this?

    Thank you, Meryl

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On most browsers, the <ul> element has a default margin/padding so just zero it like:

    Code:
    <span style="font-family:Arial, Helvetica, sans-serif; font-size:13px; font-weight:bold;">Data analysis including/span>
    <ul style="margin:0;padding:0;"><li>Reports back to 1997</li>
    <li>Total U.S. spending</li>
    <li>Rankings of more than 900 books</li>
    <li>Top 200 books</li>
    </ul>

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2010
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you again


Tags for this Thread

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
  •