Skip to main content

Matsuko Friedland

Almanac

top / bottom / left / right

The top, bottom, left, and right properties are used with position to set the placement of an element. They only have an effect on positioned elements, which are elements with the position property set to anything other than static. For example: relative, absolute, fixed, or sticky.

div {
  <top || bottom || left || right>: <length> || <percentage> || auto || inherit;
}

You might use it, for example, to nudge an … Read article

icon-link icon-logo-star icon-search icon-star