vertical split-screen custom shape - html

I want to make a vertical split-screen with a custom shape, like in my attached image But it must be cross browser supported. I tried with a clipping path, but that's not supported in FireFox, so I tried with CSS transform, but my background also transformed, which I don't want. Also, I want to know if the way I did it is the proper way or if there is a better way. Please suggest.
demo
https://jsfiddle.net/cyber007/8yyrv33q/ or
https://codepen.io/pagol/pen/qXqZJM
Html
<div class="section hpanel leftpan">
<div class="background-img">
<div class="content-area">
<h2>What is Lorem Ipsum?</h2> Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...
<div class="btn-area">
ENTER </div>
</div>
</div>
</div>
<div class="section hpanel rightpan">
<div class="background-img">
<div class="content-area">
<h2>Why do we use it?</h2> It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.
<div class="btn-area">
ENTER </div>
</div>
</div>
</div>
CSS
html {
font-size: 62.5%;
}
.noscroll {
overflow: hidden
}
body {
font-size: 1.5em;
line-height: 1.6;
font-weight: 400;
font-family: 'Poppins', sans-serif;
color: #555555;
overflow-x: hidden;
}
img {
height: auto;
}
.hpanel {
position: absolute;
top: 0;
bottom: 0;
height: 100%;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
color: #fff
}
.leftpan {
left: -4%;
width: 60%;
-webkit-transform: skew(-8deg);
-moz-transform: skew(-8deg);
-o-transform: skew(-8deg);
}
.leftpan .background-img {
background-image: url(http://d1i3xayf43lpeg.cloudfront.net/58l7lmmaka1i/2jqTg1i70ce8G6yUyIi624/77fcf976d461fd96715da306b0afec34/cover.jpg);
}
.rightpan {
right: -4%;
width: 59%;
-webkit-transform: skew(8deg);
-moz-transform: skew(8deg);
-o-transform: skew(8deg);
}
.rightpan .background-img {
background-image: url(https://www.pixelo.net/wp-content/uploads/2017/07/02_free-duotone-photoshop-effects-pixelo.jpg);
}
.background-img {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}
.leftpan .content-area {
-webkit-transform: skew(8deg);
-moz-transform: skew(8deg);
-o-transform: skew(8deg);
}
.rightpan .content-area {-webkit-transform: skew(-8deg);
-moz-transform: skew(-8deg);
-o-transform: skew(-8deg);}
.content-area {
text-align: center;
margin: 20vh auto;
width: 350px
}
.content-area h2 {
font-size: 2.8rem;
margin-bottom: 50px
}
.btn-area {
margin-top: 50px
}
.btn-area a {
padding: 13px 0;
width: 70%;
text-align: center;
background-color: #fff;
border-radius: 50px;
display: inline-block;
font-size: 18px;
font-weight: 500;
text-decoration: none;
color: #000;
letter-spacing: 1px;
}

Taking a cue from your approach of using skew to make the shape, I thought about taking it a step further by skewing the parent and then inserting the image in a child with opposite skew to offset the image skew. So the image doesn't appear distorted.
Here is what I came up with. It seems to work pretty well on most screen sizes, but breaks on tall, narrow screens.
html,
body {
height: 100%;
background-color: midnightblue;
/*just to illustrate*/
}
.wrapper {
width: 100%;
height: 100%;
position: relative;
}
.left,
.right {
width: 55%;
height: 100%;
top: 0;
transform: skewX(-8deg);
overflow: hidden;
}
.left {
position: relative;
left: -5%;
}
.right {
position: absolute;
right: -5%;
}
.left .inner,
.right .inner {
width: 100%;
height: 100%;
background-size: cover;
background-repeat: no-repeat;
transform: skewX(8deg);
}
.left .inner {
background-image: url("https://upload.wikimedia.org/wikipedia/commons/3/39/Panorama_Paris_December_2007-2.jpg");
margin-left: 9%;
}
.right .inner {
background-image: url("https://upload.wikimedia.org/wikipedia/commons/2/23/Hong_Kong_Skyline_Restitch_-_Dec_2007.jpg");
margin-left: -9%;
}
<div class="wrapper">
<div class="left">
<div class="inner"></div>
</div>
<div class="right">
<div class="inner"></div>
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">

Related

HTML Image on top of triangle background

I have an image on a triangle background, however there is seen a line crossing the image. I tried using z-index together with position both relative and absolute, but it doesn't seem to work. Can someone help me out? Much appreciated.
/* Reset. */
* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
font-size: 100%;
font-family: Arial, Helvetica, sans-serif;
}
/* Panels. */
.splitview {
position: relative;
width: 100%;
min-height: 45vw;
overflow: hidden;
}
.panel {
position: absolute;
width: 100vw;
min-height: 45vw;
overflow: hidden;
}
.panel .content {
position: absolute;
width: 100vw;
min-height: 45vw;
color: #FFF;
}
.panel .description {
width: 25%;
position: absolute;
top: 50%;
transform: translateY(-50%);
text-align: center;
}
.panel img {
box-shadow: 0 0 20px 20px rgba(0, 0, 0, 0.15);
width: 35%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.bottom {
background-color: rgb(44, 44, 44);
z-index: 1;
}
.bottom .description {
right: 5%;
}
.top {
background-color: rgb(77, 69, 173);
z-index: 2;
width: 50vw;
/*-webkit-clip-path: polygon(60% 0, 100% 0, 100% 100%, 40% 100%);
clip-path: polygon(60% 0, 100% 0, 100% 100%, 40% 100%);*/
}
.top .description {
left: 5%;
}
/* Handle. */
.handle {
height: 100%;
position: absolute;
display: block;
width: 5px;
top: 0;
left: 50%;
z-index: 3;
}
/* Skewed. */
.skewed .handle {
top: 50%;
transform: rotate(30deg) translateY(-50%);
height: 200%;
-webkit-transform-origin: top;
-moz-transform-origin: top;
transform-origin: top;
}
.skewed .top {
transform: skew(-30deg);
margin-left: -1000px;
width: calc(50vw + 1000px);
}
.skewed .top .content {
transform: skew(30deg);
margin-left: 1000px;
}
/* Responsive. */
#media (max-width: 900px) {
body {
font-size: 75%;
}
}
<div class="splitview skewed">
<div class="panel bottom">
<div class="content">
<div class="description">
<h1>My name is John Snow.</h1>
<p>I like making popcorn with icicles alot.</p>
</div>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/original-image.jpg" alt="Original">
</div>
</div>
<div class="panel top">
<div class="content">
<div class="description">
<h1>I dream about this girl everyday, but cannot seem to forget her.</h1>
<p>People say not many people can fall in love, and it's good I can experience it, but what is unrequited love worth actually.</p>
</div>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/original-image.jpg" alt="Duotone">
</div>
</div>
<div class="handle"></div>
</div>
Use only one image and put it outside the panels.
/* Reset. */
* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
font-size: 100%;
font-family: Arial, Helvetica, sans-serif;
}
.splitview img {
z-index: 3;
box-shadow: 0 0 20px 20px rgba(0, 0, 0, 0.15);
width: 35%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/* Panels. */
.splitview {
position: relative;
width: 100%;
min-height: 45vw;
overflow: hidden;
}
.panel {
position: absolute;
width: 100vw;
min-height: 45vw;
overflow: hidden;
}
.panel .content {
position: absolute;
width: 100vw;
min-height: 45vw;
color: #FFF;
}
.panel .description {
width: 25%;
position: absolute;
top: 50%;
transform: translateY(-50%);
text-align: center;
}
.bottom {
background-color: rgb(44, 44, 44);
z-index: 1;
}
.bottom .description {
right: 5%;
}
.top {
background-color: rgb(77, 69, 173);
z-index: 2;
width: 50vw;
/*-webkit-clip-path: polygon(60% 0, 100% 0, 100% 100%, 40% 100%);
clip-path: polygon(60% 0, 100% 0, 100% 100%, 40% 100%);*/
}
.top .description {
left: 5%;
}
/* Handle. */
.handle {
height: 100%;
position: absolute;
display: block;
width: 5px;
top: 0;
left: 50%;
z-index: 3;
}
/* Skewed. */
.skewed .handle {
top: 50%;
transform: rotate(30deg) translateY(-50%);
height: 200%;
-webkit-transform-origin: top;
-moz-transform-origin: top;
transform-origin: top;
}
.skewed .top {
transform: skew(-30deg);
margin-left: -1000px;
width: calc(50vw + 1000px);
}
.skewed .top .content {
transform: skew(30deg);
margin-left: 1000px;
}
/* Responsive. */
#media (max-width: 900px) {
body {
font-size: 75%;
}
}
<div class="splitview skewed">
<div class="panel bottom">
<div class="content">
<div class="description">
<h1>My name is John Snow.</h1>
<p>I like making popcorn with icicles alot.</p>
</div>
</div>
</div>
<div class="panel top">
<div class="content">
<div class="description">
<h1>I dream about this girl everyday, but cannot seem to forget her.</h1>
<p>People say not many people can fall in love, and it's good I can experience it, but what is unrequited love worth actually.</p>
</div>
</div>
</div>
<div class="handle"></div>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/original-image.jpg" alt="Duotone">
</div>
It can be hard to get two elements exactly lined up when there is some sort of transform or resizing going on because the arithmetic can result in part CSS pixel being required, and that can cause trouble translating to the multiple screen pixels that can make up a CSS pixel on modern, high res screens.
Your spurious line looks like not as wide as a CSS pixel and could be screen pixels 'left behind' during these calculations.
I found your layout quite hard to follow as there were skews and other transforms.
Looking at the layout I wonder if a simpler approach - a 3 column grid with flex used to center items within the panels might suffice? It would make maintenance easier. The skews seemed to be needed for the background 'triangular' shapes and this snippet replaces them with a sloping linear gradient as the content element's background. No skewing or other transforms are required.
* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
font-size: 100%;
font-family: Arial, Helvetica, sans-serif;
}
.content {
position: absolute;
min-height: 45vw;
width: 100vw;
color: #fff;
text-align: center;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
background-image: linear-gradient(-60deg, rgb(44, 44, 44) 0, rgb(44, 44, 44) 48%, rgb(77, 69, 173) 48%, rgb(77, 69, 173) 100%);
}
.panel {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.panel .description {
width: 75%;
}
.panel img {
width: 100%;
height: 100%;
object-fit: contain;
/* commented out as I don't understand it's use here box-shadow: 0 0 20px 20px rgba(0, 0, 0, 0.15);*/
}
<body>
<div class="content">
<div class="panel">
<div class="description">
<h1>I dream about this girl everyday, but cannot seem to forget her.</h1>
<p>People say not many people can fall in love, and it's good I can experience it, but what is unrequited love worth actually.</p>
</div>
</div>
<div class="panel">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/original-image.jpg" alt="Original">
</div>
<div class="panel">
<div class="description">
<h1>My name is John Snow.</h1>
<p>I like making popcorn with icicles alot.</p>
</div>
</div>
</div>
<div class="handle"></div>
</div>
</body>

Responsive CSS Horizontal Scroll

I am trying to add a horizontal scroll onto a page so that when you scroll vertically, the page scrolls horizontally. I found a piece of code that can do this which is entirely CSS based however it doesn't seem to be responsive. I found this on CodePen.
Is there any way in which this code can be transformed into the page being responsive?
I've attached the code below.
#container {
margin-top: -15px;
}
#container .box {
width: 100vw;
height: 100vh;
display: inline-block;
position: relative;
}
#container .box>div {
width: 100%;
height: 100%;
font-size: 96px;
color: #FFF;
position: absolute;
top: 5%;
left: 2.6%;
margin: -50px 0 0 -50px;
line-height: .7;
font-weight: bold;
}
#container {
overflow-y: scroll;
overflow-x: hidden;
transform: rotate(270deg) translateX(-100%);
transform-origin: top left;
background-color: #999;
position: absolute;
width: 100vh;
height: 100vw;
}
#container2 {
transform: rotate(90deg) translateY(-100vh);
transform-origin: top left;
white-space: nowrap;
font-size: 0;
}
.one {
background-color: #45CCFF;
}
.two {
background-color: #49E83E;
}
.three {
background-color: #EDDE05;
}
.four {
background-color: #E84B30;
}
<div id="container">
<div id="container2">
<div class="box one">
<div class="full">
<img class="desktop" src="public/images/lookbook/4.jpg" alt="Header" />
</div>
</div>
<div class="box two">
<div>2</div>
</div>
<div class="box three">
<div>3</div>
</div>
<div class="box four">
<div>Last</div>
</div>
</div>
</div>
If anyone has any idea - please let me know!
I took the initiative to remove all those ugly white spaces and scroll bars, plus what you asked for: Codepen
body,
html {
height: 100%;
width: 100%;
margin: 0;
}
#container {
width: calc(100vh + 17px);
height: 100vw;
margin-top: -17px;
margin-right: 100px;
overflow-y: scroll;
overflow-x: hidden;
transform: rotate(270deg) translateX(-100%);
transform-origin: top left;
background-color: #999;
position: absolute;
}
#container2 {
transform: rotate(90deg) translateY(-100vh);
transform-origin: top left;
white-space: nowrap;
font-size: 0;
}
#container .box {
width: 100vw;
height: 100vh;
display: inline-block;
position: relative;
}
#container .box > div {
font-size: 96px;
color: #FFF;
position: absolute;
top: 0;
left: 0;
margin: 0;
line-height: 0.9;
font-weight: bold;
}
.full {
height: 100%;
width: 100%;
position: relative;
}
.desktop {
width: 100%;
height: 100%;
display: block;
position: absolute;
background-size: cover;
}
.one {background-color: #45CCFF;}
.two {background-color: #49E83E;}
.three {background-color: #EDDE05;}
.four {background-color: #E84B30;}
Here is the code you want, use the image as a background instead. This allows it to cover the div completely as you'd like it to. Whilst also being responsive.
body,
html {
height: 100%;
width: 100%;
margin: 0;
}
#container .box {
width: 100vw;
height: 100vh;
display: inline-block;
position: relative;
background-size: cover;
}
#container .box>div {
width: 100%;
height: 100%;
font-size: 96px;
color: #FFF;
position: absolute;
top: 5%;
margin: 20px 0px 0px;
line-height: .7;
font-weight: bold;
}
#container {
overflow-y: scroll;
overflow-x: hidden;
transform: rotate(270deg) translateX(-100%);
transform-origin: top left;
background-color: #999;
position: absolute;
width: 100vh;
height: 100vw;
}
#container2 {
transform: rotate(90deg) translateY(-100vh);
transform-origin: top left;
white-space: nowrap;
font-size: 0;
}
.one {
background-color: #45CCFF;
background-image: url(https://images.pexels.com/photos/1022454/pexels-photo-1022454.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260);
}
.two {
background-color: #49E83E;
background-image: url(https://images.pexels.com/photos/1023949/pexels-photo-1023949.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260);
}
.three {
background-color: #EDDE05;
background-image: url(https://images.pexels.com/photos/963071/pexels-photo-963071.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260);
}
.four {
background-color: #E84B30;
background-image: url(https://images.pexels.com/photos/1022928/pexels-photo-1022928.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260);
}
<div id="container">
<div id="container2">
<div class="box one">
<div class="full">
<div>1</div>
</div>
</div>
<div class="box two">
<div>2</div>
</div>
<div class="box three">
<div>3</div>
</div>
<div class="box four">
<div>Last</div>
</div>
</div>
</div>

Chrome version 62.0.3202.94 3d issue rendering

Can Anyone help me to solve a problem that I found on the last version of Chrome?
I found a problem on Chrome new version regarding the DIV Background in 3D.
In the Chrome versione 61.0.3163.100 the same page was rendered well.
On Safari, Internet Explore, Edge and Firefox the page is rendered without any problem.
I attached in this message just a little part of the original HTML page in order to show which is the problem.
Thanks in advance
Andrea Angeli
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333;
background-color: #fff;
}
.container-fluid {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
.corr-container {
text-align: center;
position: relative;
}
.cube {
-moz-perspective: 600px;
perspective: 600px;
-webkit-perspective: 600px;
position: relative;
width: 100%;
display: inline-block;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
}
.cube {
height: 550px;
perspective-origin: 50% 275px;
-webkit-perspective-origin: 50% 275px;
}
.cube-face-top {
left: 0;
width: 100%;
height: 3300px;
transform: rotateX(-90deg);
-webkit-transform: rotateX(-90deg);
transform-origin: center top;
-webkit-transform-origin: center top;
background-image: url(https://www.trulytaly.com/ElementiGrafica/Corridoi/Nuovi/Soffitto.png);
background-size: 100% 550px;
-webkit-background-size: 100% 550px;
}
.cube-face {
position: absolute;
top: 0;
}
.plaza-face-top {
background-repeat: no-repeat;
background-image: url(https://www.trulytaly.com/ElementiGrafica/Piazze/NuoviFilePiazza/CUT-FOTOGALLERIA2-B2-TOP.jpg);
width: 100%;
height: 550px;
background-size: 100% 550px;
position: absolute;
top: 100%;
}
.plaza-face,
.r-plaza-face {
position: absolute;
top: 0;
}
.plaza-face,
.r-plaza-face {
position: absolute;
top: 0;
}
.rplaza-face-top {
background-repeat: no-repeat;
background-image: url(../ElementiGrafica/Piazze/NuoviFilePiazza/CUT-FOTOGALLERIA2-B2-TOP.jpg);
width: 100%;
height: 550px;
background-size: 100% 550px;
position: absolute;
top: -550px;
}
.dropdown-flag {
position: relative;
display: inline-block;
}
.dropdown-content-flag {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 12px 16px;
}
.dropdown-flag:hover .dropdown-content-flag {
display: block;
}
.col-sx-dx-div-principale {
display: none;
width: 0;
height: 0;
}
#media screen and (min-width: 1900px) {
.div-principale {
max-width: 90%;
position: relative;
float: left;
}
.col-sx-dx-div-principale {
display: block;
position: relative;
float: left;
background-color: white;
transform-style: preserve-3d;
transform: translateZ(20000px);
z-index: 9999999;
height: 900px;
width: 5%;
}
}
}
<div class="div-principale" style="margin: 0 auto; padding: 0;">
<div class="container-fluid" style="padding: 0px;">
<div style="padding-right:0px;padding-left:0px;" class="virtual-container">
<div class="corr-container">
<div class="cube-container">
<div id="cube" data-inverted="false" class="cube" data-p="front">
<div class="cube-face ct cube-face-top">
<div class="pt plaza-face plaza-face-top"></div>
<div class="pt plaza-face rplaza-face-top" style="display:none"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

How to center a text which is placed on an image

I have the following code:
HTML:
<div class="container-fluid">
<div class="row css-logo-image">
<a href="#">
<div class="meteor_head">
<h1 class="meteor_heading">Meteor</h1>
<h3>Some text!</h3>
</div>
<img src="" class="landing-image imageMeteor" />
</a>
</div>
<div class="row css-logo-image">
<a href="#">
<img src="" class="landing-image" />
</a>
</div>
</div>
CSS:
.meteor_head{
position: absolute;
z-index: 1;
margin-left: 40vw;
}
.imageMeteor{
position: relative;
z-index: 0;
}
.meteor_heading{
color: white;
font-size: 100px !important;
font-family: 'Exo 2', sans-serif;
}
.mainarea{
padding-top: 0 !important;
}
As you can see, I am trying to display the text on the image by using z-index. It works but the only problem is that I do not know how to center the text responsively. I tried a lot of things including:
margin-left:40vw;
It just refuses to work.
.meteor_head {
position: absolute;
z-index: 1;
width: 100%;
}
.imageMeteor {
position: relative;
z-index: 0;
}
.meteor_heading {
color: white;
font-size: 100px !important;
font-family: 'Exo 2', sans-serif;
text-align: center;
}
h3 {
text-align: center;
}
.mainarea {
padding-top: 0 !important;
}
If you know the height/width of the text the trick below could work:
.meteor_head{
position: absolute;
z-index: 1;
width: 200px;
height: 100px;
top:50%;
left:50;
margin-top: -50px;
margin-left: -100px;
}
Basically, you can center an absolute element using top/left 50% and then fix it by decreasing half of both height and width of the element...
try this
* {
box-sizing: border-box;
font-family: sans-serif;
}
.container {
position: relative;
overflow: hidden;
}
img {
width: 100%;
opacity: .8;
}
.centered-text {
border-radius: 6px;
padding: 0 6px;
color: white;
text-align: center;
background-color: rgba(0, 0, 0, .4);
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
<div class="container">
<img src="https://parrot-tutorial.com/images/nature_autumn.jpg">
<div class="centered-text">
<h4>Centered</h4>
<p>Lorem ipsum dolor sit amet.</p>
</div>
</div>

Need help creating slated or angled divs CSS/HTML

I need help creating responsive divs with background images that have a slant or angle in them with no border to achvive a look like this:
http://jsfiddle.net/b4zjs60k/
<div class="rr-left">
</div>
<div class="rr-right">
</div>
I have tried using background images with this solution, the only problem is the angled borders are color and if I add a background image to that it looks all messed up.
I've seen this one: http://codepen.io/jefflupinski/pen/azvsA but the only problem with the skew is that I need to have the left and right sides to be straight
So i was wondering if anyone has found a solution to make both divs touch and have responsive backgrounds or combine both in a way to incorporate images
thanks hopefully this makes sense
Try the method below and adjust as needed.
#holder {
height: auto;
width: auto;
float: left;
overflow: hidden;
font-family: calibri;
background-color: white;
position: relative;
}
#holder .content {
display: inline-block;
width: 45%;
text-align: center;
position: relative;
color: white;
cursor: pointer;
background: #2c3e50;
margin-left: 0;
z-index: 2;
}
#holder .content:hover {
background-color: #425160;
}
.content:hover .line {
background: #425160!important;
}
#holder .line {
-ms-transform: rotate(10deg);
/* IE 9 */
-webkit-transform: rotate(10deg);
/* Chrome, Safari, Opera */
transform: rotate(10deg);
border-left: solid 1px white;
position: absolute;
right: 89%;
display: block;
width: 40px;
background: inherit;
height: 250px;
bottom: -10px;
z-index: -1;
}
p,
h3 {
padding: 0 30px 0 30px;
text-align: left;
width: 70%;
}
h3 {
font-size: 24px;
line-height: 24px;
margin-bottom: 0;
}
<div id="holder">
<div class="content">
<h3>This is a header</h3>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</p>
</div>
<div class="content">
<div class="line"></div>
<h3>This is a header</h3>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</p>
</div>
</div>
<!-- End Holder -->
Here is my answer, using skew, but in a container that has overflow hidden
.header {
width: 100%;
height: 0%;
padding-bottom: 25%;
position: relative;
overflow: hidden;
}
.left {
width: 60%;
height: 100%;
position: absolute;
right: 50%;
top: 0px;
transform: skew(-20deg);
overflow: hidden;}
.right {
width: 60%;
height: 100%;
position: absolute;
left: 50%;
top: 0px;
transform: skew(-20deg);
overflow: hidden;
}
.innerleft {
content: "";
position: absolute;
width: 100%;
height: 100%;
background-image: url(http://placekitten.com/800/400);
transform: skew(20deg);
left: 10%;
background-size: cover;
}
.leftcontent {
position: absolute;
left: 100px;
top: 60px;
color: white;
font-size: 40px;
}
.right:after {
content: "";
position: absolute;
width: 100%;
height: 100%;
background-image: url(http://placekitten.com/600/500);
transform: skew(20deg);
right: 10%;
background-size: cover;
}
<div class="header">
<div class="left">
<div class="innerleft">
<div class="leftcontent">LEFT</div>
</div>
</div>
<div class="right"></div>
</div>