CSS
-Tricks
treehouse :
what would you like to learn today?
Web Design
Web Development
iOS Development
Show search box
Search
Search in:
All
Articles
Forums
Snippets
Videos
✕
Home
Forums
Snippets
Gallery
Videos
Almanac
Demos
Lodge
Navigation 'n' Search
Forums
Illustration by Nick Sirotich
Forums
»
CSS Combat
Div on top of Image
Odd_E
Permalink to comment
#
January 2012
I need some help. I wanted to put a ribbon ( as shown
here
) On top of an image. z-index never seems to work out for me, so, is there any other way? I would prefer a jsfiddle.
Senff
Permalink to comment
#
January 2012
My suggestion in that thread did not involve any use of z-index:
http://jsfiddle.net/senff/42xEX/
Here's an alternative, using negative margin:
http://jsfiddle.net/42xEX/5/
Hompimpa
Permalink to comment
#
January 2012
http://jsfiddle.net/tovic/4KEeA/
???
Odd_E
Permalink to comment
#
January 2012
Ah! Negative margin! That'd work, but I'll try it soon. Thanks for the help. I can't believe I din't think of that.
Odd_E
Permalink to comment
#
January 2012
Thanks
@Hompimpa
This is what I needed:
http://jsfiddle.net/4KEeA/19/
Add a Comment
Here's an alternative, using negative margin: http://jsfiddle.net/42xEX/5/
???