1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

inline 'li' element - background image only displaying on first element?

Discussion in 'CSS' started by JamieC, Oct 22, 2005.

  1. #1
    Hi All,

    I am currently trying to get an unordered list to display with its elements inline, with bullet seperators.

    The way I am doing this at present is with the following CSS:
    
    <ul id="steps-info">
    <li>foo</li>
    <li>bar</li>
    </ul>
    
    
    		#steps-info {
    			margin: 0;
    			padding: 0;
    			list-style-type: none;
    		}
    			#steps-info li {
    				display: inline;
    				padding: 0 5px 0 15px;
    				background-image: url(img-white-bullet.gif);
    				background-repeat: no-repeat;
    			}
    
    Code (markup):
    This approach works perfectly in Firefox, but in IE only the first bullet is rendered.

    Grateful for any comments.

    Cheers,

    Jamie
     
    JamieC, Oct 22, 2005 IP
  2. Arnica

    Arnica Peon

    Messages:
    320
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Jamie

    The code displays both bullets for me in IE6. Created a 10px square .gif to test.
     
    Arnica, Oct 22, 2005 IP
  3. balkanboy

    balkanboy Banned

    Messages:
    1,950
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    0
    #3
    try ul#steps-info li instead of #steps-info li
    Sometimes solves my problems but don'y know why.
     
    balkanboy, Oct 27, 2005 IP
  4. JamieC

    JamieC Well-Known Member

    Messages:
    226
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #4
    Thanks for everyone's help - ended up doing it graphically as I couldn't get it to work properly in the evil IE5!
     
    JamieC, Oct 28, 2005 IP