What is the CSS display property and can you give a few examples of its use?

display Description
none Does not display an element (the element no longer affects the layout of the document). All child element are also no longer displayed. The document is rendered as if the element did not exist in the document tree
block The element consumes the whole line in the block direction (which is usually horizontal)

What is the CSS display property and can you give a few examples of its use? (Cont...)

display Description
inline Elements can be laid out beside each other
inline-block Similar to inline, but allows some block properties like setting width and height

What is the CSS display property and can you give a few examples of its use? (Cont...)

display Description
table Behaves like the <table> element
table-row Behaves like the <tr> element
table-cell Behaves like the <td> element
list-item Behaves like a <li> element which allows it to define list-style-type and list-style-position

What is the CSS display property and can you give a few examples of its use?

By Code 100mph

What is the CSS display property and can you give a few examples of its use?

  • 159