Development/CSS
css - position Property(absolute vs relative)
linuxism
2015. 6. 16. 10:27
CSS Syntax
position: static|absolute|fixed|relative|initial|inherit;
Property Values
| Value | Description | Play it |
|---|---|---|
| static | Default value. Elements render in order, as they appear in the document flow | Play it » |
| absolute | The element is positioned relative to its first positioned (not static) ancestor element | Play it » |
| fixed | The element is positioned relative to the browser window | Play it » |
| relative | The element is positioned relative to its normal position, so "left:20" adds 20 pixels to the element's LEFT position | Play it » |
| initial | Sets this property to its default value. Read about initial | Play it » |
| inherit | Inherits this property from its parent element. Read about inherit |
source - http://www.w3schools.com/cssref/pr_class_position.asp
absolute는 조상요소가 relative가 아니면 fixed와 동일하게 위치됨?