Width
Width is a measure of extent along a specified dimension, such as spatial size or the number of units or features in a model.
Web Design Playground, Second Edition
The CSS width property specifies the horizontal size of an element's content box or replaced content.
- How it is used
- Controls element width to shape page layout and keep onscreen text lines readable.
- How deep it goes
- Explains browser defaults, accepted values, inline-element limits, and the box-model sizing question without pursuing advanced layout behavior.
- Examples
- Uses a 550px personal home page, a text-width adjustment exercise, and a horizontal rule narrowed within its container.
- What you can do after
- Apply it via CSS to size block elements and adjust text line lengths.
Read how Web Design Playground, Second Edition explains width →
Tiny CSS Projects
The CSS width property specifies the horizontal size of an element's box.
- How it is used
- Uses width to size responsive cards, matching card faces, circular share links, and a collapsible menu.
- How deep it goes
- Works through viewport, percentage, fixed, and changing widths in UI examples; leaves the share menu’s JavaScript behavior in starter code.
- Examples
- Shows a profile card, two credit-card faces, 48-pixel share links, a collapsible menu, and SVG loader bars.
- What you can do after
- Apply it via CSS to size a responsive card and reveal a menu by changing its width.
Web Design Playground
The horizontal extent or measure of an object or layout box.
- How it is used
- Controls element-box dimensions and helps liquid layouts respond to changing screen widths.
- How deep it goes
- Explains browser defaults, inline exceptions, parent-relative percentages, and the initial steps of converting fixed widths to a liquid layout.
- Examples
- Calculates a 75%-wide child as 750px or 600px when its parent changes from 1,000px to 800px.
- What you can do after
- Apply it via CSS width and max-width to let layouts scale with their parent while limiting their maximum width.
Timeless Algorithms, The Foundational Ideas
Network width is the number of computational units in a neural network layer.
- How it is used
- Characterizes how many patterns a layer can represent at one processing stage, in contrast with depth’s successive transformations.
- How deep it goes
- Defines width as nodes per layer and explains its role in representing varied visual patterns.
- Examples
- Uses pedestrian recognition to illustrate nodes responding to edges, textures, shapes, body parts, and context.
- What you can do after
- Understand how widening a layer increases pattern capacity without guaranteeing generalization.
Read how Timeless Algorithms, The Foundational Ideas explains width →
Also covered in
- D3.js in Action, Third Edition
- .NET MAUI in Action
- Math for Web Design
- Rearchitecting LLMsIn early access (MEAP)
- CSS in Depth, Second Edition
- Machines that ThinkIn early access (MEAP)
- Grokking AI Algorithms, Second Edition
- Deep Learning with PyTorch, Second Edition
- Data Storytelling with Altair and AI
- Pro Angular 16
What to know first
- borderA CSS border is the visual edge surrounding an element’s content and padding areas, defined by properties such as width, style, and color.
- CSSCSS (Cascading Style Sheets) is a stylesheet language for specifying the presentation and layout of structured documents.
- parameterA parameter is a value or named input that specifies or influences the behavior, computation, or output of a function, model, or system.
- attentionAttention is a neural-network mechanism that computes input-dependent relevance weights to combine information from representations for a context-dependent computation.
Related concepts
- max-width propertyconfigured by · The CSS max-width property sets the maximum permitted width of an element’s applicable box.
- line lengthconfigures · Line length is the amount of text occupying one line, commonly measured by character count or rendered horizontal width.
- min-width propertyconfigured by · The CSS min-width property specifies the minimum permitted width of an element’s applicable box.
- CSS box modelused by · The CSS box model describes each element as a rectangular box composed of content, padding, border, and margin areas that determine its dimensions and surrounding space.
- flex-basisalternative to · The CSS flex-basis property specifies a flex item’s initial size along the flex container’s main axis before available space is distributed.
Questions about width
What is width?
Width is a measure of extent along a specified dimension, such as spatial size or the number of units or features in a model.
Which Manning books explain width?
Web Design Playground, Second Edition, Tiny CSS Projects, Web Design Playground and Timeless Algorithms, The Foundational Ideas.
What should I know before learning width?
Manning books that teach width usually introduce border, CSS, parameter and attention first.
What is the difference between width and flex-basis?
Width is a measure of extent along a specified dimension, such as spatial size or the number of units or features in a model. The CSS flex-basis property specifies a flex item’s initial size along the flex container’s main axis before available space is distributed.
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.



