Click to See Complete Forum and Search --> : relative postion and absolute


sakherq
12-15-2007, 04:06 PM
how can i combine relative and absolute style position for a div
iam working on a menu
like this one :
<div style="??????">
<a href="link1">link1</a>
<a href="link2">link2</a>
<a href="link3">link3</a>
</div>
and i want the menu to appear above other tags in the page ( like absolute position )
but i want it's position to be relative to where it is HTML code is inserted i the page.

am i clear in this question ?

WebJoel
12-15-2007, 06:00 PM
style="position:relative; z-index:500;" ? The "z-index:integer" 'lifts' the positioned element 'over top of', letting other things be 'behind' or 'underneith' it. Requires a "position:foo" (relative or absolute) to work.

The default "z-index" of page is either "0" or "1", so this will be "499 above", at the least. Any number will suffice. I like to do increments of 100. Makes it easier to understand later on..