Forum Moderators: not2easy

Message Too Old, No Replies

z-index, getting 2 things to overlap

         

bobrocks

9:59 pm on Feb 27, 2005 (gmt 0)

10+ Year Member



Hello, is there anyway I can get 2 objects that arent absolutly positioned to overlap?

I have a coloured strip that goes accross the top of the page 20px from the top, I want the banner picture to extend above and below this strip. But the strip continue all the way across. I can get them to sit beside each other but that not much use.

I have at the moment


<html>
<head>
<title>this is what I have</title>
<style>
#header {
height: 70px;
}
#strip {
border-width: 2px 0px 2px 0px;
border-style: groove none groove none;
border-color: #000 #fff #000 #fff;
background: #869BBF;
height: 50px;
margin-top: 20px;
}
#banner_img {
width: 210px;
height: 130px;
}
</style>
</head>
<body>
<div id="header">
<img id="banner_img" src="./images/bob.jpg">
<div id="strip">
<div id="nav">
</div>
</div>
</div>
</body>
</html>

Inside nav I have my menu, but I've left it out here.

Is there anyway I can do this, or an alternative?

Is getting a strip of the background and repeating it all the way accross as a background a sensible option?

Cheers
Bob

scottmack

11:37 pm on Feb 27, 2005 (gmt 0)

10+ Year Member



Try using negative top margins

bobrocks

7:29 pm on Feb 28, 2005 (gmt 0)

10+ Year Member



Thank you very much.

Worked perfectly.

Cheers
Bob