FIND YOUR NEXT FEW LINES

Results for “CSS”

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

135 snippets foundClear filters
jQueryCollections & styling

Set several inline styles together

jQuery: Pass a property-value object to css.

jQuery✓ Tested
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
CSSInteraction selectors

Style a card based on a selected descendant

CSS: Has matches the parent when its relative selector finds a checked control inside it.

CSS✓ Tested