Simply :
(source: d.pr)
This is what I'd like to achieve the cleanest way possible.
I'm using Inuit.css
here.
It should be pretty simple but the padding makes it more complicated.
(I didn't think it was relevant to add the markup here.)
EDIT:
I was wrong. Here:
<div class="content content--work">
<div class="container--bigger">
<div class="grid">
<div class="grid__item one-half">
<div class="work-main">
<img src="img/work/timburton-1.svg" alt="">
</div>
</div>
<div class="grid__item one-half">
<div class="challenge">
<h3 class="work-title">The challenge</h3>
I needed to create a strong system.<br>
Something that would be good enough to generate 7 posters.
</div>
</div>
</div>
</div><!-- container bigger -->
One-half are inline blocks that take up half the size of the container. The gutter is made with the padding. (border-box)
grid__item {
display: inline-block;
padding-left: 30px;
}
one-half {
width: 50%;
}
* EDIT 2 :*
I came up with this. Doesn't work very well.
The border between the gradient is not at the intersection if we resize the window. Also, I've tried to make it with a gradient, doesn't work very well in my opinion. (percent vs fixed width)
Here is the css: (same html):
.challenge
background: #f4f0e5
padding-top: 20px
padding-bottom: 30px
vertical-align: top
padding: 20px
box-shadow: inset 5px 0 0 #9b9797
margin-bottom: 20px
.content--work
background: #423c3f
padding-top: 0
padding-bottom: 0
background: #423c3f /* Old browsers */
background: -moz-linear-gradient(left, #423c3f 0%, #423c3f 50%, #f7f5ea 50%, #f7f5ea 100%) /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#423c3f), color-stop(51.1%,#423c3f), color-stop(51.1%,#f7f5ea), color-stop(100%,#f7f5ea)) /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, #423c3f 0%,#423c3f 50%,#f7f5ea 50%,#f7f5ea 100%) /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, #423c3f 0%,#423c3f 50%,#f7f5ea 50%,#f7f5ea 100%) /* Opera 11.10+ */
background: -ms-linear-gradient(left, #423c3f 0%,#423c3f 50%,#f7f5ea 50%,#f7f5ea 100%) /* IE10+ */
background: linear-gradient(to right, #423c3f 0%,#423c3f 50%,#f7f5ea 50%,#f7f5ea 100%) /* W3C */
.container--bigger
padding-top: 20px
background: image-url("work-separation.png") repeat-y 51.5% 60%
- What's more, it acts differently depending on the browser I'm using