|
CSS Home
CSS TutorialIntroductionCSS Advantages CSS Syntax Implementing CSS CSS Class CSS ID CSS Font CSS Text CSS Background Code CSS Border CSS Margin CSS Padding CSS Lists CSS Height & Width CSS Positioning CSS Float CSS Layers CSS Summary CSS CodesCSS AlignCSS bgcolor CSS Cellpadding CSS Cellspacing CSS Hyperlinks CSS Leading Inline Style Sheets Embedded Style Sheets External Style Sheets CSS Scrollbars CSS Table Width CSS Print Version CSS Table-layout CSS ExamplesCSS ExamplesCSS Table-layout Example CSS ReferenceCSS Mini TutorialCSS Properties CSS Color Codes CSS Template CSS Media Types Got a MySpace Page?Get "www.yourname.com" for your MySpace page. Learn how >>. |
CSS PositioningThe term "CSS positioning" refers to using CSS to position elements on your HTML page. CSS allows you to position any element precisely where you want it. You can specify whether you want the element positioned relative to its natural position in the page or absolute based on its parent element. Absolute positioning can be very useful for creating advanced layouts and cool visual effects such as overlapping elements to present a layered effect. Relative PositioningTo perform relative positioning in CSS you use position:relative; followed by the desired offset from either top, right, bottom or
This results in:
This div has relative positioning.
This example offsets the element 80 pixels from the left of where it would have been. If we had specified Absolute PositioningTo perform absolute positioning in CSS you use position:absolute; followed by the desired offset.
Fixed PositioningFixed positioning allows you to fix the position of an element to a particular spot on the page - regardless of scrolling.
Enjoy this website?
Oh, and thank you for supporting Quackit! |
FREE Hosting!With every domain name you register with ZappyHost, you get FREE (ad supported) hosting.PLUS you get:
Featured Template:
(Build your websites in minutes!) |