Three Sided Border and Different colors for Border
If you need to put a border on only three sides of an element, there are a bunch of ways you can do it. You can specifically declare the border on just three sides: div { border-top: 1px solid red; border-right: 1px solid red; border-bottom: 1px solid red; } Verbose, but easy to understand. Or, you could declare just a border which will cover all four sides and remove the one you don't want. div { border: 1px solid red; border-left: 0; } Much shorter, but relies on understanding and maintaining that the border removing override is kept after the border declaration. Or, you could declare the color and styling and use shorthand only the border-width to specifically declare the three sides. div { border-color: red; border-style: solid; border-width: 1px 1px 1px 0; } Shorter than the first example, but less repetitive. Just need to be aware if left border did acquire width it would already be red and solid. And then there is the fact ...