I have the following simple HTML structure:
<section id="teasers">
<div class="wrapper">
<a href="">
<div class="redbox">
<h2 class="two-lines uppercaseme lowercaseme">Behind the Scenes<br/>
<span class="lowercaseme">A look at studio life</span>
</h2>
<div class="clearfix"></div>
</div>
</a>
</div>
</section>
And the following CSS applied:
.redbox {
padding: 0 55px;
display: flex;
align-items: center;
justify-content: flex-start;
}
#teasers h2 {
float: left;
margin: 7% 0;
}
The bug can be seem HERE. If you reduce the screen size to below 992px.
Basically, applying flex causes the H2
tag inside .redbox
to have a purple border. If you remove display: flex
in the dev tools the purple border vanishes. How come?
Is this a known issue and what is the solution to this?