Monday, 19 March 2012

CSS z-index ing

I've been programming websites for a while and I've always avoided using z-index because when I asked my web development teacher about his he just laughed.
I've had a few dabbles at trying to implement it myself with no real guidance and up until till now I haven't figured out why it didn't work.
On the W3Schools info about z-indexing there is one note that is not very prominent that should be the first thing they speak about.
z-index only works on positioned elements (position:absolute, position:relative, or position:fixed).

If I had known about this, I would've been using z-indexing a whole lot more.
I hope you find this helpful.

1 comment:

Please leave a comment if you've found this tutorial helpful or if you're facing any problems and I will endeavour to assist you.