[CSS]CSS Advanced - CSS Display
개발관련/CSS/CSS3 2012. 10. 23. 22:11 |출처: http://www.w3schools.com/css/css_display_visibility.asp
CSS Display - Block and Inline Elements
A block element is an element that takes up the full width available, and has a line break before and after it.
Examples of block elements:
- <h1>
- <p>
- <div>
An inline element only takes up as much width as necessary, and does not force line breaks.
Examples of inline elements:
- <span>
- <a>
Changing How an Element is Displayed
Changing an inline element to a block element, or vice versa, can be useful for making the page look a specific way, and still follow web standards.
The following example displays list items as inline elements:
The following example displays span elements as block elements:
Note: Changing the display type of an element changes only how the element is displayed, NOT what kind of element it is. For example: An inline element set to display:block is not allowed to have a block element nested inside of it.
CSS Display
How to hide an element (visibility:hidden)
How to not display an element (display:none)
How to display an element as an inline element
How to display an element as a block element
How to make a table element collapse
'개발관련 > CSS/CSS3' 카테고리의 다른 글
[CSS]CSS Advanced - CSS Floating (0) | 2012.10.23 |
---|---|
[CSS]CSS Advanced - CSS Positioning (0) | 2012.10.23 |
[CSS]CSS Advanced - CSS Dimension (0) | 2012.10.23 |
[CSS]CSS Advanced - CSS Grouping and Nesting (0) | 2012.10.23 |
[CSS]CSS Box Model - CSS Padding (0) | 2012.10.23 |