user782104 user782104 - 7 months ago 30
CSS Question

How can I set a css border on one side only?

For a given

I would like to only display a border on the left, right, top, or bottom side.

Currently I have the following, which puts a border on all sides:

#testdiv {
border: 1px solid;

What do I need to do in order to have a border only on the left side?

#testdiv {
   border-left: 1px solid;

See the MDN documentation on border.