FIND YOUR NEXT FEW LINES

Results for “style”

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

140 snippets foundClear filters
CSSGetting Started

Set space between text lines

CSS: Learn how to set space between text lines in a complete browser example.

CSS✓ Tested
CSSInteraction selectors

Show a pressed pointer state

CSS: Active applies during the pointer press rather than after the click has finished.

CSS✓ Tested
CSSInteraction & themes

Show keyboard focus

Use a visible CSS outline when an input receives keyboard focus.

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
CSSLayout

Space items with gap

Use CSS gap instead of margins between flex children.

CSS✓ Tested
CSSGrid placement

Span a grid item across multiple columns

CSS: Grid-column span counts tracks and includes the gaps between them.

CSS✓ Tested
CSSFlexbox alignment

Specify a flex item’s initial main size

CSS: Flex-basis establishes the starting main-axis size before growth or shrinkage.

CSS✓ Tested
CSSResponsive design

Stack columns on small screens

Change a two-column CSS grid to one column at a viewport breakpoint.

CSS✓ Tested
CSSFlexbox alignment

Stack flex items vertically

CSS: Flex-direction column makes the main axis vertical.

CSS✓ Tested
HTMLMetadata & document links

Suggest a browser interface color

HTML: Theme-color is a browser chrome hint and does not style the page itself.

HTML✓ Tested
CSSGetting Started

Target a unique element by ID

CSS: Learn how to target a unique element by ID in a complete browser example.

CSS✓ Tested