View Full Version : gradient + patterned background with a div layer. how do I get it to work?


xsweetxlanax
07-01-2006, 05:54 PM
I've tried for like 3 hours just to get the coding right for this particular layout and I just cant :( I'm having problems with getting the background to repeat since it's a gradient that goes down and it has a pattern AND because of the black column for the content box.

This is how I want the layout to look like:
http://img265.imageshack.us/img265/3640/layout9hw.gif
(obviously the whole thing isn't going to fit... the background is just extended for viewers with higher resolutions. In a 1024x768 resolution the layout should be centered.)

This is the header:
http://img409.imageshack.us/img409/5120/header5nc.gif

This is the background:
http://img179.imageshack.us/my.php?image=v150063nb.gif
(it needs to repeat horizontally)


and I have no idea how the black column is gonna be included into there o.o

Brian-W.O.G
07-01-2006, 07:12 PM
Well, to get the background to repeat horizontally, I would use a script like this:

<html>
<head><style type="text/css">

body {background-image: url (your-image.jpg);
repeat: repeat-x} /*I use the value x for the x axis which is horizontal, if I wanted to affect the vertical axis I would use the value y */

.contentdiv {position: absolute; /* absolute positioning means that it will be positioned with the border. The other value which is relative is positioning it relative to where it would normally be */
left: 50; /* this means that the content div will be positioned 50 pixels away from the left border of the page */
top: 20} /* this means that the content div will be positioned 20 pixels away from the top border of the page */

</style></head><body>

<div class="contentdiv">
<!-- content in the div goes here -->
</div>
</body>
</html>


Is that something like what you meant?

God bless