Is it possible to get rid of the “triangle” shape in the border corners? (when using different color borders)
See this example:
Any workaround? Basically I just want the top and bottom border to continue, and not have a mix of all of them.
.borders {
width:500px;
height:500px;
background:#efefef;
border:10px solid black;
border-top:10px solid red;
border-bottom:10px solid green;
}
One option using generated content:
JS Fiddle demo.
Or with nested HTML (if you really must):
JS Fiddle demo.
And a single-nested-element solution in which the left, and right,
border-coloris thebackground-colorof the wrapping element, and the width controlled by themarginof the descendant:CSS:
JS Fiddle demo.