+ 1
Css borders 🖼️
Can i use 2 borders in css and add 2 different colors ???
3 Answers
+ 1
A workaround is using box-shadow: inset 0 0 0 5px red; less positioning problems than border.
+ 2
A box element can have just ONE border but in css, a border is subdivided into 4 and they can have different styling that matches your preference
border-left
border-right
border-top
border-bottom
if your objective is to have different outlines for a box, I think you can embed your target box into N boxes.
N boxes are parent element to your target box and they should've have a relative size(width, height) with your target box, then you can apply different borders to them and increase the css attribute `border-width` RELATIVELY
<Nbox1>
<Nbox2>
<target box>
there may be other possible solutions
0
Use padding instead, you can also pad the border.