Inline-block
Inline-block is a CSS display value that places an element in inline flow while retaining block-like sizing and layout behavior.
Web Design Playground
An element that participates in inline layout while retaining block-like box behavior for sizing and layout.
- How it is used
- Places selected elements side by side in page layouts, particularly legacy layouts or small components.
- How deep it goes
- Works through sizing, column alignment, and whitespace between elements; favors flexbox rather than extending inline-block into a modern layout system.
- Examples
- Uses a logo beside a heading, horizontal navigation items, and an article beside a sidebar.
- What you can do after
- Build it from scratch by applying `display: inline-block` to adjacent elements and adjusting column widths, alignment, and intervening whitespace.
Tiny CSS Projects
Inline-block is a CSS display value that keeps an element in inline flow while allowing block-like dimensions and spacing.
- How it is used
- Fixes padded inline links in summary cards and checkout cards so their visible height fits the surrounding layout.
- How deep it goes
- Explains default inline behavior, demonstrates the height problem, and applies the display change without covering layout internals.
- Examples
- Demonstrates bright call-to-action links in hotel cards and padded controls in checkout-card sections.
- What you can do after
- Diagnose/debug with CSS when vertical padding fails to enlarge an inline link inside a card.
Web Design Playground, Second Edition
An inline block is a CSS layout mode in which an element participates in inline flow while generating a block container for its contents.
- How it is used
- Uses inline-block to keep elements inline while giving them block-style sizing and spacing control.
- How deep it goes
- Defines the display behavior and demonstrates navigation spacing, but does not explore layout internals or edge cases.
- Examples
- Demonstrates unordered-list navigation with inline-block list items and right padding between labels.
- What you can do after
- Apply it via CSS to size inline elements and build spaced horizontal navigation menus.
Read how Web Design Playground, Second Edition explains inline-block →
CSS in Depth, Second Edition
Inline-block is a CSS display value that makes an element participate as an inline-level box while retaining block-container behavior.
- How it is used
- Combines inline placement with block-like sizing and container behavior when ordinary inline elements produce unsuitable spacing or wrapping.
- How deep it goes
- Explains padding, line growth, wrapping, and margin collapsing, but does not develop a complete implementation pattern.
- Examples
- Uses padded tag lists and container margin-collapsing cases to contrast inline, inline-block, and flex layouts.
- What you can do after
- Apply inline-block when elements must wrap as units, grow their line, or prevent outside margin collapse.
Read how CSS in Depth, Second Edition explains inline-block →
What to know first
- inline containerAn inline container is an HTML element that participates in inline layout, flowing with surrounding content and potentially wrapping within its containing block.
- borderA CSS border is the visual edge surrounding an element’s content and padding areas, defined by properties such as width, style, and color.
- block-level elementA block-level element is an HTML element that participates in block layout, typically starting on a new line and occupying the available width of its container.
- display propertyThe CSS property that specifies how an element generates boxes and participates in layout.
Related concepts
- display propertyconfigured by · The CSS property that specifies how an element generates boxes and participates in layout.
- inline containercontrasts with · An inline container is an HTML element that participates in inline layout, flowing with surrounding content and potentially wrapping within its containing block.
- paddingaddresses · Padding is the provision of extra values, characters, bytes, or space around or within data or an element to meet length, boundary, block-size, spacing, or alignment requirements.
- collapsing marginaddresses · Collapsing margin is CSS behavior in which adjoining vertical margins combine into a single effective margin rather than being added together.
- holy-grail layoutused by · The Holy Grail layout is a web page pattern with central content flanked by sidebars, typically accompanied by a header and footer.
- headingconfigured by · A heading is a textual or semantic label that introduces or identifies a section of content and may indicate its level in a document hierarchy.
Questions about inline-block
What is inline-block?
Inline-block is a CSS display value that places an element in inline flow while retaining block-like sizing and layout behavior.
Which Manning books explain inline-block?
Web Design Playground, Tiny CSS Projects, Web Design Playground, Second Edition and CSS in Depth, Second Edition.
What should I know before learning inline-block?
Manning books that teach inline-block usually introduce inline container, border, block-level element and display property first.
What is the difference between inline-block and inline container?
Inline-block is a CSS display value that places an element in inline flow while retaining block-like sizing and layout behavior. An inline container is an HTML element that participates in inline layout, flowing with surrounding content and potentially wrapping within its containing block.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



