Webmonkey
Powered by Atomz.com



Quick Reference:

Javascript Code Library
HTML Cheatsheet
Special Characters
Color Codes
Browser Chart
• Stylesheets Guide
Unix Guide
Glossary
Domain Registries

Reference   Stylesheets Guide

CSS-P (Position)

CSS-P allows you to explicitly determine the position of HTML elements, providing powerful layout control both for static documents and for dynamic, animated HTML-based content.

There are two basic methods of positioning HTML elements using the position property. Absolute position lets you set an element's position arbitrarily - that is, relative to its parent container and independent of the document's flow. Relative position allows an element to be offset relative to its natural position in the document's flow.

Position is specified with the top and/or left properties using a <length> value (relative or absolute as appropriate).

The visibility property sets the display state of the element, but doesn't affect its position in the layout: An element takes up the same space whether hidden or visible.

Z-index is used to specify the stacking order of the positionable elements above or below other HTML elements. The number value may be positive or negative, and must be an integer. Default z-ordering of elements in a document is back-to-front in the order of their appearance in the HTML.

The overflow element is used to control the display of an element's contents in cases where they exceed its given dimensions. It applies only to elements with the position property of type "absolute."

Dynamic aspects of managing positioned elements, like hiding, displaying, and movement, are implemented using an external scripting language, such as JavaScript.

The top and left properties may be expressed as percentages. For other CSS-P properties listed, percentages do not apply.

- What Is CSS?
- How CSS Works
- Linking Stylesheets
- Units of Measure
- Attributes
- CSS Properties
- CSS Examples




Feedback  |  Help  |  About Us  |  Contribute  |  Jobs
Advertise  |  Privacy Statement  |  Terms and Conditions

Copyright © 1994-2000 Wired Digital Inc., a Lycos Network site. All rights reserved.