FIND YOUR NEXT FEW LINES

Results for “layout”

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

129 snippets foundClear filters
CSSResponsive conditions & sizing

Adapt a layout to viewport orientation

CSS: The orientation query compares viewport dimensions rather than detecting a physical device type.

CSS✓ Tested
CSSResponsive conditions & sizing

Enhance a layout above a minimum viewport width

CSS: A mobile-first min-width query adds columns when enough horizontal space is available.

CSS✓ Tested
CSSResponsive conditions & sizing

Hide interface controls in print layout

CSS: A print media query can retain article content while removing interactive controls.

CSS✓ Tested
CSSVisual treatment & accessibility

Keep a label available without occupying visible layout space

CSS: A clipped one-pixel label remains the input’s accessible name.

CSS✓ Tested
ReactEffects & lifecycle

Measure an element after layout

Measure an element after layout with a small React component and explicit browser behavior.

React✓ Tested
CSSPositioning & stacking

Move a box visually without changing its layout slot

CSS: Transforms change the painted geometry while leaving surrounding normal-flow layout unchanged.

CSS✓ Tested
GoDates & times

Parse a date with a Go layout

Parse a date with a Go layout using a complete Go program with explicit sample inputs.

Go✓ 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
CSSResponsive conditions & sizing

Adapt a component to its own container width

CSS: Container queries respond to a selected ancestor rather than the full viewport.

CSS✓ Tested
CSSResponsive conditions & sizing

Add a clear boundary in forced-colors mode

CSS: Use a system color for a border when the user’s forced-color mode is active.

CSS✓ Tested
CSSVisual treatment & accessibility

Add depth with a box shadow

CSS: Box shadows are painted outside the box without reserving additional layout space.

CSS✓ 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