Menu Home

gap

osbo.com | CSS | Properties | gap

The gap CSS property is shorthand for row-gap and column-gap.

Syntax

CSS

gap: value;

JS

object.style.gap = "value";

Values

<'gap'> = <'row-gap'> <'column-gap'>?
<'row-gap'> = normal | <length-percentage>
normal

Represents a value of 1em on multi-column containers and 0px in all other contexts.

<length-percentage> = [ <length> | <percentage> ]
<length>

Specifies the length using a number followed by a unit of measurement.

<percentage>

Specifies the percentage using a number followed by a percent sign (%).

<'column-gap'> = normal | <length-percentage>
normal

Represents a value of 1em on multi-column containers and 0px in all other contexts.

<length-percentage> = [ <length> | <percentage> ]
<length>

Specifies the length using a number followed by a unit of measurement.

<percentage>

Specifies the percentage using a number followed by a percent sign (%).

Initial

normal

Examples

length

normal

percentage

JS

Internal

column-gap

row-gap

External

World Wide Web Consortium (W3C)