FIND YOUR NEXT FEW LINES

Results for “id”

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

1109 snippets foundClear filters
CSSGetting Started

Include padding in an element’s width

CSS: Learn how to include padding in an element’s width in a complete browser example.

CSS✓ Tested
CSSInteraction & themes

Include padding in element width

Use border-box to keep CSS padding and borders inside the declared width.

CSS✓ Tested
Linux CommandsTransforming text

Join lines from two files side by side

Linux Commands: Use paste to pair lines by position with a chosen separator.

Linux Commands✓ Tested
CSSPositioning & stacking

Keep a child’s large z-index inside a stacking context

CSS: Isolation creates a stacking context so an internal stack level cannot outrank an outside sibling’s higher context.

CSS✓ Tested
CSSPositioning & stacking

Keep a tall section inside a local vertical scroller

CSS: A bounded height and overflow auto keep long content from stretching the surrounding page.

CSS✓ Tested
Arduino / CGetting Started

Keep a value inside an allowed range

Arduino / C: Keep a value inside an allowed range on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
RustErrors & optional values

Keep an optional value only when valid

Keep an optional value only when valid in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsProcesses & environment

Keep loop state by avoiding a pipeline subshell

Bash Scripts: Redirect input into a while loop so updates to a counter remain in the current shell.

Bash Scripts✓ Tested
Linux CommandsGetting Started

Keep spaces inside one argument

Linux Commands: Keep spaces inside one argument using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
CSSGetting Started

Limit a content column’s width

CSS: Learn how to limit a content column’s width in a complete browser example.

CSS✓ Tested
HTMLMetadata & document links

Mark the language of a phrase inside a page

HTML: An element-level lang attribute identifies a language change within the document.

HTML✓ Tested
ReactPerformance & rendering

Memoize an object passed to a provider

Memoize an object passed to a provider with a small React component and explicit browser behavior.

React✓ Tested