I have a div with different colors for both the border-bottom and border-right properties. So they are separated via a line leaving the box in a 45 degree angle.
How can I make the bottom-border shorter so that the right border goes all the way to the bottom of the element which would yield a 90 degree angle separator-line?
Here is another approach using CSS transform: skew(45deg) to produce the cut corner effect. The shape itself involves three elements (1 real and 2 pseudo-elements) as follows: The main container div element has overflow: hidden and produces the left border.
The border-radius CSS property rounds the corners of an element's outer border edge.
You can do this with box-shadow
.
Demo:
#borders { border-bottom: 20px solid black; box-shadow: 20px 0 0 0 red; height: 150px; margin: 30px; width: 150px; }
<div id="borders"></div>
I solved this issue using border-width
. You simply reduce the width of the border at the edges you don't want to see.
If we don't want the border on the upper edge, we can put border-width
to 0.
border-width: 0px 5px 5px 5px; border-color:#ddd #000 #000 #000;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With