NameSilo

CSS - Layers

Spaceship Spaceship
Watch
Impact
0
**
This code is used to place an image behind text. You can change the left and top dimensions to move the image anywhere on the page - (be sure to replace "yourimage.gif" with the appropriate image)
**


<html>

<head>
<style type="text/css">
img.x {position: absolute; left: 10; top: 20; z-index: -1}
</style>
</head>

<body>

<h1>You can enter your text here...</h1>
<img class="x" src="yourimage.gif" width="100" height="100">

<p>z-index is always default at 0. -1 will place the image behind the text...</p>

</body>
</html>
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
0
•••
Cool. I'm gonna have to try it. I've been working on a CSS lately so it'll be easy to implement this. In fact, I'm getting ideas already :D Thanks!
 
0
•••
Dang this is nice!!! Never knew it existed tho:(

!!!
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back