Borders
Learn how to manage border sides, shapes, line types, and size.
We'll cover the following...
Border features
Borders are similar to margins and padding but are more complicated because they can have their own color and style.
The size options for borders are more limited because we do not typically want borders as big as margins might get. More importantly, the size options for borders are measured in pixels, not rem
. The most basic border option is .border
, which gives us a 1-pixel border in all four directions.
After that, we have .border-{side}-{size}
. Unlike padding and margins, a dash(-
) is included before the side. The side options are: bottom (-b
), top (-t
), left (-l
), and right (-r
). Not including a side applies the ...