Status
Not open for further replies.

Jayar

Active Member
629
2009
15
40
Hey guys,

I was wondering if theres some way I could get something like this to serve as a background layer:

Code:
//background layer
<div>
<img src="backgroundimg.png"/>
</div>

//layers above it
<div>etc</div><div>more</div>

I have an idea of I could make this work, but my method would be sort of unorthodox I think, and probably be glitchy.

Thanks for your help
 
4 comments
That's not the correct way to do it.
PHP:
<div class="bitches">
	<div class="whore">
		<p>Example of Something here</p>
	</div>
</div>

And then you have a CSS File
PHP:
.bitches {
	background:#abcdef url(images/bg.png);
	etc etc.
}
.whore {
	color:#12345;
	padding:10px;
	margin:20px;
	etc etc.
}
 
PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title></title>
   <style type="text/css">
       .bottomDiv {
       // u can use z-index: 0; and same assign below to 1
       }
       .topDiv {
           position: absolute;
           top:10px;
           left:20px;
           width:200px;
           height:25px;
           // z-index: 1; 
       }
   </style>
</head>
<body>
<div class="bottomDiv">
 <img src="http://freaktools.com/images/logo.png" alt="">
</div>
 <div class="topDiv">Here comes your content</div>
</body>
</html>

you can also use z-index as well.

Edit: Plz change your avatar its so annoying, thank you
 
Last edited:
Status
Not open for further replies.
Back
Top