Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

unknown CSS - z-index:#;


  • Please log in to reply

#1
Throntel

Throntel

    Member

  • Member
  • PipPip
  • 39 posts
I've read some tutorials and learned the rest just by reading the CSS from other sites, but I can't figure out what this means and do:

z-index:#;

I've found this in the same CSS stylesheet:

position:relative; /* Position is declared "relative" to gain control of stacking order (z-index).*/

So I'm guessing they have something to do with each other.
Could anyone explain this z-index:#;
  • 0

Advertisements


#2
intrwrks

intrwrks

    Member

  • Member
  • PipPip
  • 16 posts
Throntel

You can think of z-index as the drawing layer. When you position 2 items that would overlap the z-index specifies which one is drawn on top. It only works when used with the position attribute. The higher numbers appear on top.

Check out this article: Understanding CSS z-index

Regards,

intrwrks
  • 0

#3
Magosis

Magosis

    Retired Staff

  • Retired Staff
  • 190 posts
That is correct it does need to be uysed with the position atribute, and also the higher numbers are the upper layers, a great way of playing with this is to make a series of images, and usign the position and zindex move them around the screen
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP