SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    essex, england
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I would like the li text to be away from the icon in IE!

    I have got a li list with a ul round it.

    I have set the list to use an icon as it's bullet. In firefox there is a nice gap between the icon and the start of the text. In IE there is no gap!

    I have tried padding and margins and shouting and screaming. All the usual avenues. But to no avail.

    Can anyone shed some light on how this is achieved to produce consistent output across the two browsers (and opera of course)?

    Thanks for any help in advance.

  2. #2
    SitePoint Member
    Join Date
    Jan 2007
    Location
    Hull, England
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try using a background image

    Code:
    ul { 
            list-style: none;
    }
    
    li {
            display: block;        
            background-image: url("bullet.gif");
    	background-repeat: no-repeat;
    	background-position: 0 5px;
    	padding: 0 0 0 20px;
    }
    Design is not just what it looks like and feels like.
    Design is how it works.

    www.cycadelic.org

  3. #3
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    essex, england
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    hmm

    i hadn't thought of that. Thank you, i'll give it a try!

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,540
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    The list-style-image is almost impossible to position correctly and although it is the semantically correct method I always use the background image method pointed out by Craig because you can position it exactly where you want cross-browser.

  5. #5
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    essex, england
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Excellent tip. Now lets see if i can remember it for next time.....


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
  •