I have to create a style to apply a background color and padding to a header element, resulting the following intended appearance (Photoshop mock-up):
My CSS
Demo here : http://jsfiddle.net/korigan/jzm3qu1q/1/
HTML
Amet assumenda atque eos excepturi harum ipsa
CSS
.wrap {
width: 150px;
}
.highlight {
color: #fff;
display: inline;
background: blue;
font-size: 25px;
font-weight: normal;
line-height: 1.2;
}
.highlight .text {
padding: 4px;
box-shadow: 4px 0 0 blue, -4px 0 0 blue;
background-color: blue;
box-decoration-break: clone; /* For Firefox */
}