# CSS display contents

DevFeed: [CSS display contents](<https://devfeed.tech/articles/css-display-contents-45317.md>)

Original publisher: [Read original article](<https://ishadeed.com/article/display-contents/>)

Author: Ahmad Shadeed

Published: 2024-09-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ahmad Shadeed](<https://devfeed.tech/sources/ahmad-shadeed.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [layout](<https://devfeed.tech/topics/layout.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>)

Tags: [css](<https://devfeed.tech/tags/css.md>), [css-grid](<https://devfeed.tech/tags/css-grid.md>), [flexbox](<https://devfeed.tech/tags/flexbox.md>), [grid](<https://devfeed.tech/tags/grid.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [html](<https://devfeed.tech/tags/html.md>), [layouts](<https://devfeed.tech/tags/layouts.md>), [markup](<https://devfeed.tech/tags/markup.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

A CSS tutorial explaining how display: contents removes an element's box so its children participate directly in the parent layout. It demonstrates the technique with flexbox and grid, including changing visual order and styling generated HTML.

## Source excerpt

Learn how to use display contents to build more fluid layouts.