Log in

View Full Version : Div overlap



jan24
12-16-2010, 01:15 PM
What i want to do is this:


| |
---| Logo |------------------
| |________________| Links |
| Content |


Although i cant get this fixed.
I know there is a way this:

position: absolute;
z-index:2;

But i want to have my divs as follow:

float:left;

But why i used float:left; i can't use z-index:2; anybody know how to solve this?
Thanks for advance.

Nile
12-16-2010, 10:55 PM
Give it a relative position and give z-index:2;

petercpwong
12-19-2010, 08:21 PM
If you want your logo to appear above everything else, then try a bigger number for your z-index like 9999

VijayKanta
12-29-2010, 05:25 AM
#wrapper {
margin: 0 auto;
}

#logo { /* which is inside wrapper */
position: absolute;
display: block;
margin-left: 100px; /* sample */
margin-top: 50px; /* sample */
z-index: 9999; /* like above poster says, but should not be an issue afaik */
}

#belowdiv { /* comes after logo in HTML and doesn't matter */
float: left;
}