From Htmlpedia
Contents |
[edit]
CSS 1 property: display
"Display" controls the way an element is displayed.
[edit]
Property Values
This property accepts the following values :
[edit]
CSS1
| Value | Description |
|---|---|
| none | The element will be hidden. |
| inline | The element will be displayed as inline (with no line break before or after the element). |
| block | The element will be displayed as a block (with line break before or after the element). |
| inline-block | An inline-block element is laid out just like an image would be. |
| list-item | The element will be displayed as a list. |
| run-in | The element if it is a block will have the ability to be an inline part of the next element. This is usefull for some typography tricks. |
| table | The element will be displayed as a table with a line break before and after the table. |
| inline-table | The element will be displayed as a table but without line break before and after the table. |
| table-row-group | The element will be displayed like <tbody> |
| table-header-group | The element will be displayed like <thead> |
| table-footer-group | The element will be displayed like <tfoot> |
| table-row | The element will be displayed like <td> |
| table-column-group | The element will be displayed like <tbody> |
| table-column | The element will be displayed like <colgroup> |
| table-cell | The element will be displayed like <td> or <th> |
| table-caption | The element will be displayed like <caption> |
| inherit | The element will inherit the property value from the parent element. |
- Initial value: Inherit
- Inherit: No
[edit]
CSS 2
| Value | Description |
|---|---|
| marker | A more configurable version of 'list-item'. |
[edit]
Examples
![]() | <style type="text/css">
div { display: block; }
span { display: inline; }
</style>
|
![]() | <div style="display: inline-block;">Hi there</div> |
[edit]
Browser Support
If you have tested support for this property in any of the following browsers, please indicate its level of support using one of the following keywords:
- Full
- Partial
- Buggy
- None
If you indicate that support is "Partial" or "Buggy," please add further comments explaining what's missing or what doesn't work right.
- IE 3
- Support is Unknown
- IE 4
- Support is Unknown
- IE 5
- Support is Unknown
- IE 5.5
- Support is Unknown
- IE 6
- Support is Unknown
- IE 7
- Support is Unknown
- NS 3
- Support is Unknown
- NS 4
- Support is Unknown
- NS 4.5
- Support is Unknown
- NS 6
- Support is Unknown
- NS 7
- Support is Unknown
- NS 8
- Support is Unknown
- Firefox 1
- Support is Unknown
- Firefox 1.5
- Support is Unknown
- Firefox 2
- Support is Unknown
- Mozilla
- Support is Unknown
- Opera 6
- Support is Unknown
- Opera 7
- Support is Unknown
- Opera 8
- Support is Unknown
- Opera 9
- Support is Unknown
[edit]
Tips and Tricks
If you know of any useful or uncommon tips or techniques using this property, please describe them here.
[edit]
References
- W3C Specification: CSS Specification Level 1
- W3C Specification: CSS Specification Level 2
- HTMLpedia: List of CSS Properties

