Check out my latest progress on the codepen here
The number of items displayed in the gallery is dynamic based on search results. However, I am looking to add a fixed area to the right side that remains visible as the user scrolls through the gallery. Essentially, I want the last 2 out of 8 items to be styled like cards but with a fixed height equivalent to about 2 gallery cards. I hope this explanation makes sense!
<div class="wrap">
<div class="compare-gallery">
<div class="gallery-item">
<div class="gallery-image"><img src="http://fakeimg.pl/185x278/"></div>
<div class="gallery-text">
<h5>2015</h5>
<h4>A title here</h4>
<p>Content goes here...</p>
</div>
</div>
<div class="gallery-item">
<div class="gallery-image"><img src="http://fakeimg.pl/185x278/"></div>
<div class="gallery-text">
<h5>2015</h5>
<h4>A title here</h4>
<p>Content goes here...</p>
</div>
</div>
<div class="gallery-item">
<div class="gallery-image"><img src="http://fakeimg.pl/185x278/"></div>
<div class="gallery-text">
<h5>2015</h5>
<h4>A title here</h4>
<p>Content goes here...</p>
</div>
</div>
<div class="gallery-item">
<div class="gallery-image"><img src="http://fakeimg.pl/185x278/"></div>
<div class="gallery-text">
<h4>A title here</h4>
<p>Content goes here...</p>
</div>
</div>
</div>
</div>
and the css:
@import 'susy';
@import 'compass';
@include border-box-sizing;
.compare-gallery {
@include clearfix;
margin-top: 80px;
}
.gallery-item {
background-color: rgba(255, 255, 255, 0.6);
@include box-shadow(0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23));
@include gallery(3 of 8 split);
margin-bottom: gutter(8);
.gallery-image {
float: left;
}
.gallery-text {
h5 {
float: right;
}
}
}
Here's an image illustrating where I envision the 'floating' element to appear: https://i.sstatic.net/GMMHg.jpg