css z-index
- Started
- Last post
- 11 Responses
- _niko
I'm trying to place my logo div on top of two other divs within a centred layout but it's not working.
The z-index works fine but It will not stay within the container div.
this is my desired layout:#logo
{
position:absolute;
left:0px;
top:0px;
z-index:2;
}<div id="container"><div id="logo"><img src="images/logo.png" /></div>
<div class="nav"></div>
<div class="image"></div>
<div class="content"></div></div>
- juhls0
Can you give us your whole code? Like at pastebin.com?
- jamble0
Have you given your container a position: relative; declaration?
- _niko0
this is my container
#container {
position:relative;
margin: 0 auto;
width: 990 px;
}
- ETM0
If its not inside the container its positioned absolute to the body.
- ETM0
Full code? A local test shows no issue. A small thing, the #container div width wasn't recognized until I removed the space between the numerical value and the unit > 990 px to 990px.
- _niko0
FFS.
Thanks for all your help guys, it was that damn space.
- juhls0
Just about to post that, haha. I even made this. Damn it, ETM :)
http://queueban.com//niko/niko.h…
- forcetwelve0
css is so damn picky ain't it?!