I would like my gradient to pass on to the next div. Putting one div behind them with the gradient would probably work, but on my website the elements are not exactly next to eachother
.row {
clear: both;
}
.portrait {
width: 200px;
height: 200px;
background-color: red;
float: left;
}
.photo {
width: 200px;
height: 150px;
background-color: blue;
}
.gradient {
width: 200px;
height: 50px;
background-color: green;
}
<div class="row">
<div class="portrait">
<div class="photo"></div>
<div class="gradient"></div>
</div>
<div class="portrait">
<div class="photo"></div>
<div class="gradient"></div>
</div>
<div class="portrait">
<div class="photo"></div>
<div class="gradient"></div>
</div>
</div>
<div class="row">
<div class="portrait">
<div class="photo"></div>
<div class="gradient"></div>
</div>
<div class="portrait">
<div class="photo"></div>
<div class="gradient"></div>
</div>
<div class="portrait">
<div class="photo"></div>
<div class="gradient"></div>
</div>
</div>
Codepen: https://codepen.io/chingwai/pen/poEGxBe
To explain my structure:
.portrait = is the container, this is dynamically created based on my database.
.photo = will be a profile photo
.gradient = This is where the gradient should come and continue to the other divs that contain .gradient As you can see .photo will be between the divs, so they are not postioned under eachother.
