Should I make this object from pure CSS if it is possible or us it as a background image for a div?
It goes outside of main content area so I am not sure how to implement it. I guess I should use absolute positioning for the div?
We have to work with css border and we get the same....
FOR more you have to read like this articles how can you work with css shapes https://css-tricks.com/examples/ShapesOfCSS/.
.main{
padding:20px;
}
.test {
font-size: 15px;
background: #ccc;
padding:10px
}
h2
{
position: relative;
width: 50%;
font-size: 1.5em;
font-weight: bold;
padding: 6px 20px 6px 70px;
color: #555;
background-color: #AECACC;
text-shadow: 0px 1px 2px #bbb;
-webkit-box-shadow: 0px 2px 4px #888;
-moz-box-shadow: 0px 2px 4px #888;
box-shadow: 0px 2px 4px #888;
left:-20px;
}
h2:after
{
content: ' ';
position: absolute;
/*EDIT border WIDTH as you want fold tringle with css */
border-bottom: 10px solid #8BA8AA;
border-left: 10px solid transparent;
height: 0;
width: 0;
left: 0px;
/*EDIT TOP as border width */
top: -10px;
}
<div class="main">
<div class="test">
<h2>HEADING HERE</h2>
</div>
</div>
CSS only solution using
border
: