3 replies [Last post]
franco_bao
Offline
Regular
Montreal, Canada
Last seen: 6 years 42 weeks ago
Montreal, Canada
Timezone: GMT-4
Joined: 2006-05-03
Posts: 21
Points: 0

I would like to know if it is possible to to actually have a different background image for one

  • from another in the same
      . I have one
        and I would like for each
      • to have it's own image icon. Is this possible and if so how do i go about it. I have tried creating a new style and attaching a class span to the
      • . I end up having both images. Thanx
  • franco_bao
    Offline
    Regular
    Montreal, Canada
    Last seen: 6 years 42 weeks ago
    Montreal, Canada
    Timezone: GMT-4
    Joined: 2006-05-03
    Posts: 21
    Points: 0

    Let me rephrase the post

    Seems like my tags have taken another form in the post. this is what i wanted to say.

    I would like to know if it is possible to to actually have a different background image for one
    li from another in the same ul. I have one li and I would like for each to have it's own image icon. Is this possible and if so how do i go about it. I have tried creating a new style and attaching a class span to the li. I end up having both images. Thanx

    chequebookvandal
    Offline
    Regular
    Last seen: 6 years 45 weeks ago
    Joined: 2005-11-29
    Posts: 15
    Points: 0

    This might work

    Html


    • sjhgshjsgj

    • jhjhjkhk


    CSS

    ul li.one {list-style-image: url("image1.gif");}
    ul li.two {list-style-image: url("image2.gif");}

    This should specify a different image for each li depending on its class

    CBV

    Hugo
    Hugo's picture
    Offline
    Moderator
    London
    Last seen: 20 hours 38 min ago
    London
    Timezone: GMT+1
    Joined: 2004-06-06
    Posts: 15655
    Points: 2793

    Do you mean you want a

    Do you mean you want a bullet image? if so follow chequebookvandals idea of a class but place the image as a background which works better than list-style-image and is always preferred. Use padding or margins to move text/link away to make room.

    Hugo.

    Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
    ----------------------------------------------------------------
    Please post ALL your code - both CSS & HTML - in [code] tags
    Please validate and ensure you have included a full Doctype before posting.
    Why validate? Read Me