CSS: Z-index
- Started
- Last post
- 18 Responses
- Dancer
So, I am thinking about my site and was wondering if you can "layer" up div's of text (with a BG colour) and when you click on a link the relevent text comes to the front.
Any pointers
- emecks0
show/hide layers behaviour in Dreamweaver....
- determinedmoth0
You'll need some JavaScript in there I thinks.
- Dancer0
Will that control Divs then MX?
- emecks0
aye it most certainly will, I think you need to give each DIV an ID in order for Dreamweaver to recognise it as a layer but aye.... that's how it's done, ken?
- Dancer0
I may well be in touch over the W/E ;)
- emecks0
anytime mate.
- dc_again0
yeah, get dreamweaver to spit out loads and loads and loads of really shit and unecessary code.
or do something as simple as:
var top_div = 10
function make_this_top(id){
top_div ++
document.getElementById(id).styl... = top_div;
}either way.
- emecks0
dc_again is the winner!
- Dancer0
OK dc sounds good to me, I am aware that DW spits out alot of unwanted code but I am no Javascript person and if I wanted to amend it I may get it fucked up.
I maybe intouch with you as well dc_again, is that OK?
- emecks0
I maybe intouch with you as well dc_again, is that OK?
Dancer
(Apr 8 05, 06:05)See what bein' a clever hoooooor does for ye?
- dc_again0
yeah, no probs, but not over the weekend as i'm always too drunk to turn my PC on.
just knocked this up for you. see if you can use it:
- Dancer0
Wow, Nice Thank you very much.
The only problem is on the first state I want them all to be invisible.
- emecks0
onLoad: visibility = false
or summit like that I imagine but now I'm just making things up in a vain attempt at saving face....
- dc_again0
pretty good emecks :)
try that link again. is that what you mean?
- Dancer0
You are an amazing (wo)man dc. How about this then? Making the others disappear when you click on a different link?
- dc_again0
man.
er....now i'm confused. why would you want them to disappear? isn't that the point of the zindex?
if it's not too complicated, as i have got 'work' to do, send me an email with what you're talking about and i'll see if i can knock something up.
- Dancer0
Just incase one layer is longer than another. and you can see it poke out the bottom.
Thanks for you help dc, will mail ya over the W/E . really appreciate it
- emecks0
I imagine you could build some sort of for loop into the function which cycles through all other layers and sets their visibility to "false"
*hopes JS is similar enough to AS that this works...