Quackit Logo
$1.99 Domain Names
With every new non-domain purchase thru ZappyHost, you get a domain name for only $1.99.
Create free Flash websites

CSS position

Print Version

Also see the full, alphabetical list of CSS properties


The CSS position property is used in positioning an element. It can be used in conjunction with the top, right, bottom and left properties to position an element where you want it.

Also see the float property.

Syntax: position: <value>
Possible Values:
  • static - The element flows as normal. The left and top properties don't take effect.
  • relative - The element is offset relative to it's normal position in the flow.
  • absolute - The element is positioned based on it's containing block. The element is taken out of the normal flow. Any subsequent elements will not be impacted - they will appear where they normally would even if the previous element was not offset.
  • fixed - Similar to absolute, but also doesn't move when scrolled.
  • inherit
Initial Value: static
Applies to: All elements except for generated content
Inherited: No
Media: Visual
Example:
div {
  position: fixed;
  top: 20px;
  left: 50px;
  }
Try it yourself!


Also see all CSS properties listed alphabetically


Enjoy this website?

  1. Add this page to your Favorites
  2. Link to this page (copy/paste into your own website or blog):
  3. Help support Quackit by making a donation

Oh, and thank you for supporting Quackit!

FREE Hosting!
With every domain you register with ZappyHost you get FREE hosting.
Need Website Content?
Get unique, quality digital content for your website.
  • 270+ Website Templates
  • 800+ Flash Templates
  • 25,000+ Images, Logos
  • 30,000+ e-Books
  • 15,000+ Scripts
  • 27,000+ Animated GIFs
  • 21,000+ Ringtones
  • ...and much more!
Get your content now!
© Copyright 2000 - 2010 Quackit.com