liveBook · Manning

Inline-block

Inline-block is a CSS display value that places an element in inline flow while retaining block-like sizing and layout behavior.

How 4 Manning books explain it

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.

Read how Web Design Playground explains inline-block →

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.

Read how Tiny CSS Projects explains inline-block →

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

Related concepts

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.