JSFiddle - React, Tailwind, and code Playground
by Chris LaFrombois
February 04, 2019
HTML
<div id="RPheaderRow">
<div id="RPheader">Header title here</div>
<div id="RPdesc">This is where my description will go...</div>
<div id="RPheaderButton"> CTA </div>
</div>
CSS
* {
box-sizing: border-box;
}
#RPheader {
float: left;
position: relative;
width: 40%;
padding: 10px;
height: 40px;
color: #FFFFFF;
background: #004851;
}
#RPheader:after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 0;
height: 0;
}
#RPheader:before {
content: "";
position: absolute;
right: -5px;
bottom: 0;
width: 0;
height: 0;
border-left: 5px solid #004851;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
z-index: 1;
}
#RPdesc {
float: left;
position: relative;
width: 50%;
padding: 10px 20px;
height: 40px;
color: #555555;
background-color: #F1ECEA;
}
#RPdesc:after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 0;
height: 0;
}
#RPdesc:before {
content: "";
position: absolute;
right: -10px;
bottom: 0;
width: 0;
height: 0;
border-left: 10px solid #F1ECEA;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
}
#RPheaderButton {
float: left;
width: 10%;
padding: 10px 10px 10px 20px;
height: 40px;
color: #FFFFFF;
background-color: #00afd7;
}