Electric Type

Multimedia

About Us

News

Help

Introduction to CSS Positioning

Page 5 — The z-index

The z-index determines which elements are drawn over others. For example, if you have two elements that inhabit the same space, you need to specify which gets drawn and which is hidden. The one with the highest z-index number gets placed on top, while the one with the lowest gets placed on the bottom. This order is relative to the parent element, so even if an element has a z-index of a million, but its parent is at the bottom of the z-index, it can't rise above it in the overall scheme of things.

Visibility controls whether or not the element is drawn on the screen. Its values are visible and hidden, which are pretty much self-explanatory. One important thing to remember here, though: Don't get this confused with the Netscape layers syntax of show and hide, because they won't work.

Width and height work pretty much the way they always have, but absolutely positioned objects can also have percentage widths and heights. As I said before, percentage is my friend.

next page»


Dynamic HTML  

Frames  

HTML Basics  

Stylesheets  

Tables  

XML  

Javascript  

Database Connections  

Intro To Perl  

HTML 4.0  

User Blogs

Screen Shots

Latest Updates

Contact Us

Valid HTML 4.01!
Valid CSS!

Breadcrumb

© ElectricType
Maintained by My-Hosts.com
Site map | Copyright | Disclaimer
Privacy policy | Acceptable Use Policy
Legal information.