Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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