user782104 user782104 - 1 year ago 89
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?

Answer Source
#testdiv {
   border-left: 1px solid;

See the MDN documentation on border.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download