CSS Border Generator
Choose border or outline, set width, style, colour, radius and which side to apply it to, preview it and copy the CSS.
Choose border or outline, set width, style, colour, radius and which side to apply it to, preview it and copy the CSS.
The border property draws a line around an element. It needs a width, a style and a colour. An outline looks similar but sits outside the box and does not take space.
Set the values, check the preview and copy the CSS. You can limit a border to one side or switch to an outline.
border-bottom: 3px solid #4f46e5;
A border is part of the box and adds to its size. An outline is drawn outside the box, takes no space and cannot be set per side.
A border needs a style other than none. Width, style and colour must all be present for the shorthand to draw a line.
In current browsers yes. Older browsers drew a square outline.
HEX, rgb(), hsl() and colour names such as tomato.
Write the per-side properties yourself, for example border-top-color. Generate the base here and adjust.