- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 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 thought this would be a simple matter. I have a featured ribbon that I want to sit on the top left of an image. I can’t see the ribbon. If I remove the image, I can see that the ribbon is sitting right where I need it to it’s just under the image. I have positioning on the ribbon for the z-index, what is missing?
So currently you have the featured span as the direct parent of the image. The problem being that a parent can never sit in front of a child (the parent is what contains the child). You would be best using a sibling element, like this: http://jsfiddle.net/joshnh/9G5Df/
No worries. I do stuff like that all the time :p
Hi guys,
I’ve extended this ever so slightly. Instead of employing an empty SPAN, I’ve added in the word ‘featured’ and used the newer version image replacement technique to hide the text. So now you can aid your SEO (slightly) at the same time by having tasty text in your HTML code.
Updated image replacement technique at:
http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/