FIND YOUR NEXT FEW LINES

Results for “dimensions”

Small, practical examples. Search by task or narrow things down below.

16 snippets foundClear filters
HTMLImages & embedded documents

Reserve an image’s display dimensions

HTML: Width and height attributes supply a known display size and aspect ratio before decoding finishes.

HTML✓ Tested
CSSBox dimensions & overflow

Add inner spacing to a content-sized box

CSS: In content-box sizing, padding adds to the declared content width.

CSS✓ Tested
CSSBox dimensions & overflow

Cap a box’s width

CSS: Max-width constrains an otherwise larger declared width.

CSS✓ Tested
CSSBox dimensions & overflow

Clip content that exceeds a fixed-height box

CSS: Overflow hidden clips the painted content while the full content remains in the DOM.

CSS✓ Tested
CSSBox dimensions & overflow

Enforce a minimum width

CSS: Min-width can prevent a declared smaller width from taking effect.

CSS✓ Tested
CSSBox dimensions & overflow

Hide an element while keeping its space

CSS: Visibility hidden preserves layout geometry even though the element is not painted.

CSS✓ Tested
jQueryCollections & styling

Measure content, padding, and borders separately

jQuery: width, innerWidth, and outerWidth measure different parts of the box.

jQuery✓ Tested
CSSBox dimensions & overflow

Place fixed-size boxes on the same line

CSS: Inline-block allows dimensions while participating in inline layout.

CSS✓ Tested
CSSBox dimensions & overflow

Remove a hidden element’s layout space

CSS: Display none removes a box from layout as well as hiding its contents.

CSS✓ Tested
CSSBox dimensions & overflow

Reserve space for a visible border

CSS: A border adds to the outer dimensions of a content-box element.

CSS✓ Tested
CSSBox dimensions & overflow

Size a child relative to its containing block

CSS: A percentage width is based on the containing block’s available width.

CSS✓ Tested
CSSBox dimensions & overflow

Size a panel relative to viewport height

CSS: Viewport height units track the browser viewport rather than the parent element.

CSS✓ Tested