CSS Position

CSS Tutorial  >  Position

The position property specifies what kind of position is used. Possible values include:

  • static (default): indicates that the element will be placed at the default location. Please note that if static is specified, values for the top, bottom, right, and left properties will have no effect.
  • absolute: places an element in relation to the actual browser window. The position of the element moves along with the rest of the content when the page is scrolled.
  • relative: specifies how the element will be positions relative to how it would have been positioned by default.
  • fixed: places an element in relation to the actual browser window. The position of the element remains fixed even when the page is scrolled.

From the list of possible values, we can see that the position property by itself does not have a lot of value. After all, what does {position:relative;} mean if there is no information on what it is relative to? So, clearly additional properties are needed to complement the position property. They are as follows:

  • top
  • right
  • left
  • bottom
  • overflow
  • z-index

    Next: CSS Absolute



    Copyright © 2013   1keydata.com   All Rights Reserved   Privacy Policy

  • CSS Tutorial
    CSS Syntax
    Apply CSS
    CSS Media Types
    CSS Cascade
    CSS Inheritance
    CSS Class ID
    CSS Div Span
    CSS Length Units

    CSS Box Model
    CSS Margin
    CSS Border
    CSS Padding
    CSS Background
      CSS Background-attachment
      CSS Background-color
      CSS Background-image
      CSS Background-position
      CSS Background-repeat
    CSS Color
    CSS Font
    CSS Link
    CSS List
    CSS Table
    CSS Position
      CSS Absolute
      CSS Relative
      CSS Fixed
      CSS Static
      CSS Top
      CSS Bottom
      CSS Left
      CSS Right
      CSS Overflow
      CSS Z-Index
    CSS Text
    CSS Float
    CSS Clear
    CSS Cursor
    CSS Wrap

    CSS Codes

    Resources

    CSS Tutorial German