background
|
|
Computer

Tombstone
Tombstone Tuning
Home of tuning, projects and fast cars and boats.
More icon
|
|
Up Image
Navigation
Search this Site
Enter your search terms

Site Breadcrumb - You are here
|
Reference   Stylesheets Guide


Quick Reference:

HTML Cheatsheet | Special Characters | Color Codes
Browser Chart | Stylesheet Guide | Unix 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