- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I have many li tags and want to show a small image inside of them. I use content:url('...png')
, and should give each li
an image URL. So The server requests increase, one request for each image. And we can’t use something like background-position
to reduce request here.
One of the solutions that I found is using CSS based images (base64).
Is there any other ideas?
It’s the same image for every list item? I can’t see how you couldn’t use a background image here…
No, they are not same. See my Sidebar Here, at the right of page, the 3th box, the colorful-hover list…
You could give each li a unique id and then put a background on them that way. And you could use a sprite to make sure only one file is being downloaded.
Yea, and how to keep the background image on hover?
On hover, the color cover the icon. Result.
There will be a transition problem if I use another background tag on hover.
You could include the colored background in your sprite?
I want my li to have a background-color on li:hover. What’s your purpose about including the colored background in sprite?