SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard rctneil's Avatar
    Join Date
    Jun 2005
    Posts
    1,898
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Background Position on <li>

    Hello,
    I am using this:

    Code CSS:
    li
    {
    background-position: top left;
    }

    How can I put a slight top margin on that background to budge it down about 5 pixels. I don;t want to use

    Code CSS:
    background-position: center left;

    I want to have it positioned top left but pushed down about 5 pixels?

    Thanks

    Regards,
    Neil

  2. #2
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    Bring your horizontal value (left or right) first and then the vertical (top or center) after it.

    background-position: 0 5px;

  3. #3
    SitePoint Wizard rctneil's Avatar
    Join Date
    Jun 2005
    Posts
    1,898
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thankyou. - Works perfectly

    My bullet points on multi line <li>'s now align up with the first line of text instead of aligning vertically centre between them!


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
  •