I'm trying to add a border to a div element in HTML. Below is my code.
#container-border { border-width: 2px; border-color: red; }
<div id="container-border"> ... </div>
The default value of border-style is none. You need to set a different value for a border to appear.
border-style
none
#container-border { border-width: 2px; border-color: red; border-style: dashed; }
2.1m questions
2.1m answers
60 comments
57.0k users