| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| DesignersTalk > html z-index issue - z-index:98 displaying above z:99 ..? |
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
Registered User
|
html z-index issue - z-index:98 displaying above z:99 ..?
hi all. have a small website i've built for myself (protournews.info). still some IE6 & Safari bugs, but i am having an complete cross-browser problem with some z-indexed div's. not sure if my method of coding "should" work - it does inside my own head. have a #head div with z-index = 98. this header is position:fixed (hence the z-indexing). inside this head div are several div's. #logo div is floated left with z-index = 99. #menu div is floated right with z-index = 100. it all views correctly in full screen, however when the screen res is less 600 and the 2 div's overlap, the #menu div is hidden BEHIND the #logo div irrespective of the #logo div's z-index of 100. there are reason for the logic of my coding, but i'm sure there is a more "correct" manner of reaching the intended result. either way, i assumed the z-indexing attributes i have set would ensure the #menu div is the top layer..? |
|
|
|
|
|
#4 (permalink) |
|
Registered User
|
thanks Spaced; you are correct. i had neglected to declare positions on the floated div's, hence their failure to stack correctly. AutisticCuckoo at SitePoint Forums also corrected me with the same reasoning ...... "The z-index property only applies to positioned elements, i.e., elements whose position property has one of the values absolute, fixed or relative. Merely floating an element doesn't make it positioned, so z-index doesn't apply." |
|
![]() |