Trying to achieve the unique box design shown below using CSS.
I researched various resources, such as https://css-tricks.com/examples/ShapesOfCSS/, but encountered an issue with the purple border cutting edges. Attempted using an octagon shape without success.
Made progress on creating the box. Here is a snippet of my code:
.box-outer {
width: 300px;
height: 120px;
padding: 15px 30px;
background: rgba(237, 236, 236, 0.72);
border: 3px solid rgb(89, 67, 128);
position: relative;
border-right: 20px solid rgb(89, 67, 128);
}
.box-outer:before {
content: "";
position: absolute;
top: -3px;
left: -4px;
border-bottom: 29px solid rgb(255, 252, 252);
border-right: 29px solid #594380;
border-top: 28px solid #FFF;
height: 66%;
width: 0;
}
.box-outer:after {
content: "";
position: absolute;
top: -3px;
right: -13%;
border-top: 29px solid white;
border-left: 29px solid #594380;
border-bottom: 28px solid #FFF;
width: 0;
height: 66%;
}
.box-outer .right-text {
position: absolute;
right: -22%;
color: white;
font-size: 20px;
top: 40%;
z-index: 10;
transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
-webkit-transform: rotate(-90deg);
}
<div class="box-outer">
<span class="right-text">
LEGISLATIVE
</span>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
<!--box outer-->
Screenshot of current progress