I designed two diagonal shapes to overlay a container with a background image using the pseudo elements ::before
and ::after
.
While this setup functions correctly in Firefox and Chrome, it is not working as expected in Edge.
What could be causing this discrepancy?
Desired outcome achieved in Chrome:
Link to Chrome view
Result in Edge: Link to Edge result
The blue shape utilizes ::before
, but this pseudo element is not displaying in Edge. (When I assign the blue shape the ::before
pseudo element, the white shape disappears.)
.titelsectie {
z-index:0!important;
background-color: rgba(255,255,255,0);
background-image: url(https://images.pexels.com/photos/2404370/pexels-photo-2404370.jpeg);
background-position: center center;
background-repeat: no-repeat;
padding-top: 0px;
padding-right: 30px;
padding-bottom: 0px;
padding-left: 30px;
margin-bottom: 40px;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
margin-left: -30px;
margin-right: -30px;
position: relative;
z-index: 0!important;
padding-top: 100px!important;
}
.titelsectie::after{
content: " ";
background-color: #ffffff;
position: absolute;
width: 10%;
height: 100%;
left: -8%;
top: 0;
z-index: 0!important;
transform-origin: bottom left;
-ms-transform: skew(-16deg, 0deg);
-webkit-transform: skew(-16deg, 0deg);
transform: skew(-16deg, 0deg);
}
.titelsectie::before {
content: " ";
background-color: #201547;
position: absolute!important;
width: 10%;
height: 85%;
left: -8%;
top: 0;
z-index: 999!important;
transform-origin: bottom left;
-ms-transform: skew(-16deg, 0deg);
-webkit-transform: skew(-16deg, 0deg);
transform: skew(-16deg, 0deg);
}
<div class="titelsectie">
<div class="fusion-builder-row fusion-row ">
<div class="fusion-layout-column fusion_builder_column fusion_builder_column_1_2 fusion-builder-column-1 fusion-one-half fusion-column-first 1_2" style="margin-top:0px;margin-bottom:20px;width:48%; margin-right: 4%;">
<div class="fusion-column-wrapper" style="padding: 0px 0px 20px 0px;background-position:left top;background-repeat:no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;" data-bg-url="">
<!-- some content with text, buttons and titles-->
</div>
</div>
</div>
</div>