Skip to content

Instantly share code, notes, and snippets.

@superkevin
Created December 30, 2011 11:47
Show Gist options
  • Save superkevin/1539471 to your computer and use it in GitHub Desktop.
Save superkevin/1539471 to your computer and use it in GitHub Desktop.
Untitled
img
{
position:absolute;
left:0px;
top:0px;
z-index:5;
}
p{
position:absolute;
z-index:8;
}
<h1>This is a heading</h1>
<img src="http://blog.robin-d.fr/uploads/2010/04/scraper-google.png" />
<p>Because the image has a z-index of -1, it will be placed behind the text.</p>
{"view":"split-vertical","prefixfree":"1","page":"html"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment