Newbie - Content not staying in container - html

I'm new to web development, but hoping someone has a quick answer.
Having troubles with this: https://codepen.io/kktotheing/pen/gewXor
I can't seem to get the "data-index" (2-5) to stay in it's container. If you click on each box you'll see the content breaking.
I feel like this is something pretty simple, but can't figure it out!
Thoughts?
<section id="timeline">
<div class="content js-content" data-index="1">
<div class="article">
<img class="tmln-img left" src="img/after-party.png">
</div>
<div class="article middle">
<h2>Group Activity (optional)</h2>
<h3>
If interested in Kayaking or Paddle Boarding on Shem Creek with the dolphins, please call Nature's Adventures (843.668.3222) to reserve your spot.
</h3>
</div>
<div class="article right">
<p>Nature’s Adventures<br>
Friday<br>
September 14th<br>
11:00 AM<br><br>
view on map
</p>
<p>
Attire: Southern Chic
</p>
</div>
</div>
<div class="content js-content" data-index="2">
<div class="article">
<img class="tmln-img" src="https://www.instagram.com/p/BeoauojHb7b/?taken-at=858831521">
</div>
<div class="article">
<h2>Welcome Party</h2>
<h3>
Join us on James Island to ring in the weekend.
</h3>
</div>
<div class="article">
<p>Ellis Creek Fish Camp<br>
Friday<br>
September 14th<br>
6:30 PM – 9:30 PM<br><br>
view on map
</p>
<p>
Attire: Southern Chic
</p>
</div>
</div>
<div class="content js-content" data-index="3">
<div class="article">
<img class="tmln-img" src="https://scontent-iad3-1.cdninstagram.com/vp/189b811bf84bab74e69f38c1bb2b70da/5B473587/t51.2885-15/e35/26873054_205238820214875_3941054332882911232_n.jpg">
</div>
<div class="article">
<h2>Welcome Drinks</h2>
<h3>
For those arriving later on Friday, please join us after the Welcome Party at our favorite biergarten in downtown Charleston, before heading to King Street.
</h3>
</div>
<div class="article">
<p>East Bay Biergarten<br>
Friday<br>
September 14th<br>
9:30 AM<br><br>
view on map
</p>
<p>
Attire: Southern Chic
</p>
</div>
</div>
<div class="content js-content" data-index="4">
<div class="article">
<img class="tmln-img" src="img/after-party.png">
</div>
<div class="article">
<h2>Ceremony & Reception</h2>
<h3>
Transportation will be provided.
</h3>
</div>
<div class="article">
<p>Middleton Place<br>
Saturday<br>
September 15th<br>
5:00 PM<br><br>
view on map
</p>
</div>
</div>
<div class="content js-content" data-index="5">
<div class="article">
<img class="tmln-img" src="img/after-party.png">
</div>
<div class="article">
<h2>After Party (optional)</h2>
<h3>
For those who want to keep the party going.
</h3>
</div>
<div class="article">
<p>Uptown Social<br>
Saturday<br>
September 15th<br>
11:30 PM<br><br>
view on map
</p>
</div>
</div>
<div class="selector">
Group Activity<br>(optional)
Welcome Party
Welcome Drinks
Ceremony &<br> Reception
After Party<br>(optional)
</div>

If you want your content to have a fixed height, in addition to setting height:300px as you've done, use overflow-y:scroll
To have display:flex on every js-content, in your jQ instead of .show use .css('display','flex') . show() is essentially giving the element the style of display:block. That's why you need to give it a specific display using css()
$content.hide().filter('[data-index="' + index + '"]').css('display','flex');
var $buttons = $('.js-button');
var $content = $('.js-content');
var doContent = function(e) {
e.preventDefault();
var $this = $(e.target);
var index = $this.data('index');
$content.hide().filter('[data-index="' + index + '"]').css('display','flex');
$buttons.removeClass('js-active');
$this.addClass('js-active');
};
$buttons.on('click', doContent);
#timeline {
margin: 0 auto;
width: 70%;
border: 3px solid black;
}
.content {
margin: 0 auto;
display: none;
height: 300px;
background-color: #ffffff;
border: 1px solid #ccc;
overflow-y:scroll;/* added */
}
.content[data-index="1"] {
display: flex;
}
.content[data-index="2"],
.content[data-index="3"],
.content[data-index="4"],
.content[data-index="5"] {
display: none;
}
.article {
border: 2px dashed blue;
padding: 20px;
}
/*.left {
width: 25%;
}*/
.middle {
width: 60%;
}
.right {
width: 25%;
}
.tmln-img {
max-width: 150px;
}
a.tmln-button {
border: 1px solid green;
color: #151515;
padding: 20px;
text-align: center;
text-decoration: none;
}
a.tmln-button.js-active {
text-decoration: none;
background-color: black;
color: white;
}
.selector {
display: flex;
justify-content: space-between;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<section id="timeline">
<div class="content js-content" data-index="1">
<div class="article">
<img class="tmln-img left" src="img/after-party.png">
</div>
<div class="article middle">
<h2>Group Activity (optional)</h2>
<h3>
If interested in Kayaking or Paddle Boarding on Shem Creek with the dolphins, please call Nature's Adventures (843.668.3222) to reserve your spot.
</h3>
</div>
<div class="article right">
<p>Nature’s Adventures<br>
Friday<br>
September 14th<br>
11:00 AM<br><br>
view on map
</p>
<p>
Attire: Southern Chic
</p>
</div>
</div>
<div class="content js-content" data-index="2">
<div class="article">
<img class="tmln-img" src="https://www.instagram.com/p/BeoauojHb7b/?taken-at=858831521">
</div>
<div class="article">
<h2>Welcome Party</h2>
<h3>
Join us on James Island to ring in the weekend.
</h3>
</div>
<div class="article">
<p>Ellis Creek Fish Camp<br>
Friday<br>
September 14th<br>
6:30 PM – 9:30 PM<br><br>
view on map
</p>
<p>
Attire: Southern Chic
</p>
</div>
</div>
<div class="content js-content" data-index="3">
<div class="article">
<img class="tmln-img" src="https://scontent-iad3-1.cdninstagram.com/vp/189b811bf84bab74e69f38c1bb2b70da/5B473587/t51.2885-15/e35/26873054_205238820214875_3941054332882911232_n.jpg">
</div>
<div class="article">
<h2>Welcome Drinks</h2>
<h3>
For those arriving later on Friday, please join us after the Welcome Party at our favorite biergarten in downtown Charleston, before heading to King Street.
</h3>
</div>
<div class="article">
<p>East Bay Biergarten<br>
Friday<br>
September 14th<br>
9:30 AM<br><br>
view on map
</p>
<p>
Attire: Southern Chic
</p>
</div>
</div>
<div class="content js-content" data-index="4">
<div class="article">
<img class="tmln-img" src="img/after-party.png">
</div>
<div class="article">
<h2>Ceremony & Reception</h2>
<h3>
Transportation will be provided.
</h3>
</div>
<div class="article">
<p>Middleton Place<br>
Saturday<br>
September 15th<br>
5:00 PM<br><br>
view on map
</p>
</div>
</div>
<div class="content js-content" data-index="5">
<div class="article">
<img class="tmln-img" src="img/after-party.png">
</div>
<div class="article">
<h2>After Party (optional)</h2>
<h3>
For those who want to keep the party going.
</h3>
</div>
<div class="article">
<p>Uptown Social<br>
Saturday<br>
September 15th<br>
11:30 PM<br><br>
view on map
</p>
</div>
</div>
<div class="selector">
Group Activity<br>(optional)
Welcome Party
Welcome Drinks
Ceremony &<br> Reception
After Party<br>(optional)
</div>
</section>

Related

Footer overlapping with a section CSS

Im developing a website, and im having trouble in the footer of my page. It is overlapping with the content above it.
CSS:
.downstuff{
padding: .3em;
color: #e9e9e9;
background: #242424;
text-align: end;
}
The thing it is overlapping
HTML:
<div class="downstuff">
<p>Copyright © 2021 Oaknoak | Branded Furniture</p>
<p>Manufacturer | Chennai</p>
</div>
<section class="product-main">
<div class="product-card">
<img src="images/Prince Krish Sofa-set Ash.jpg" alt="Prince Krish" class="product-img">
<h1><a href="princekrish.html">Prince Krish Sofa-Set<a></h1>
<p class="price">₹10000</p>
<p>Prince Krish Sofa Set is made out of premium Jute fabric, Venga wood base and Kurl-on foams</p>
<p><button class="btn-cart">Add to Cart</button></p>
</div>
<div class="product-card">
<img src="images/Eden Corner Sofaa.jpg" alt="Eden Corner Sofa" class="product-img">
<h1><a href="princekrish.html">Eden Corner Sofa<a></h1>
<p class="price">₹10000</p>
<p>Eden Sofa One of the most luxurious models designed for the ultimate comfort and relaxation. </p>
<p><button class="btn-cart">Add to Cart</button></p>
</div>
<div class="product-card">
<img src="images/Cozy Rope Hammok.jpg" alt="Cozy Rope Hammok" class="product-img">
<h1><a href="princekrish.html"> Rope Hammock<a></h1>
<p class="price">₹10000</p>
<p>The New Oak’N Oak Cotton Rope Hammock, performance and comfort come together to create this Original.</p>
<p><button class="btn-cart">Add to Cart</button></p>
</div>
<div class="product-card">
<img src="images/bonair sofa.jpg" alt="Bonaire Sofa" class="product-img">
<h1><a href="princekrish.html">Bonaire Sofa<a></h1>
<p class="price">₹10000</p>
<p>Bonaire Sofa One of the most luxurious models designed for the ultimate comfort and relaxation.</p>
<p><button class="btn-cart">Add to Cart</button></p>
</div>
<div class="product-card">
<img src="images/Matiz sofa.jpg" alt="Matiz Sofa" class="product-img">
<h1><a href="images/Matiz sofa.jpg">Matiz Sofa<a></h1>
<p class="price">₹10000</p>
<p>Matiz Sofa One of the most luxurious models designed for the ultimate comfort and relaxation.</p>
<p><button class="btn-cart">Add to Cart</button></p>
</div>
<div class="product-card">
<img src="images/diva sofa.jpg" alt="Diva Sofa" class="product-img">
<h1><a href="princekrish.html">Diva Sofa<a></h1>
<p class="price">₹10000</p>
<p>Diva Sofa One of the most luxurious models designed for the ultimate comfort and relaxation</p>
<p><button class="btn-cart">Add to Cart</button></p>
</div>
<div class="product-card">
<img src="images/Tango sofa.jpg" alt="Tango Sofa" class="product-img">
<h1><a href="princekrish.html">Tango Sofa<a></h1>
<p class="price">₹10000</p>
<p>Tango Sofa One of the most luxurious models designed for the ultimate comfort and relaxation.</p>
<p><button class="btn-cart">Add to Cart</button></p>
</div>
<div class="product-card">
<img src="images/Noor sofa.jpg" alt="Noor Sofa Malt" class="product-img">
<h1><a href="princekrish.html">Noor Sofa-Malt<a></h1>
<p class="price">₹10000</p>
<p>Noor Sofa One of the most luxurious models designed for the ultimate comfort and relaxation.</p>
<p><button class="btn-cart">Add to Cart</button></p>
</div>
<div class="product-card">
<img src="images/coral sofa.jpg" alt="Diana Sofa-Coral" class="product-img">
<h1><a href="princekrish.html">Diana Sofa-Coral<a></h1>
<p class="price">₹10000</p>
<p>Diana Sofa One of the most luxurious models designed for the ultimate comfort and relaxation</p>
<p><button class="btn-cart">Add to Cart</button></p>
</div>
</section>
Problem
How its supposed to look like
I made a template for you. This is probably what you want.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>Your Page Title</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
*,
*::after,
*::before {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
width: 100%;
height: 100%;
background: #737373;
padding: 1rem;
}
body {
display: flex; /* Use flex */
flex-direction: column; /* Make it flex column this is the trick */
}
.container {
display: flex;
flex-flow: row wrap;
justify-content: space-around;
padding: 0;
margin: 0;
margin-bottom: 2rem;
}
.item {
background: yellow;
color: black;
border: 2px solid red;
text-align: center;
font-size: 40px;
display: flex;
justify-content: center;
align-items: center;
flex-basis: 25%;
height: 450px;
}
.downstuff {
margin-top: auto; /* Align element to bottom */
align-self: flex-end; /* Align element to right */
color: white;
}
</style>
</head>
<body>
<div class="container">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
</div>
<div class="downstuff">
<p>Copyright © 2021 Oaknoak | Branded Furniture</p>
<p>Manufacturer | Chennai</p>
</div>
</body>
</html>

Footer not at the bottom

For this site, the footer area jumped up the page http://lainjurylaw.wpengine.com/. It's supposed to look like this: https://sandiegolawcenter.net/. All I did was change the hero image and the footer now moved up to right underneath top area.
I tried doing a clear:both, but that didn't help.
HTML:
<div id="full-width-footer">
<div class="container">
<div class="footer">
<div class="footer-left">
<div itemtype="http://schema.org/Attorney" itemscope="">
<span class="ozols" itemprop="name">San Diego Criminal Law Center</span>
<div itemtype="http://schema.org/PostalAddress" itemscope="" itemprop="address">
<span itemprop="streetAddress">1230 Columbia Street Suite 565A</span><br/>
<span itemprop="addressLocality">San Diego</span>
,
<span itemprop="addressRegion">CA</span>
<span itemprop="postalCode">92101</span>
</div>
<span itemprop="telephone">(619) 525-7006</span>
</div>
Los Angeles Accident Law Center © 2017. All Rights Reserved.
</div>
<div class="footer-right">
CSS:
#full-width-footer {
border-top: 6px solid #248bbe;
padding-bottom: 120px;
background: #2a2a2a none repeat scroll 0 0;
}
The problem is you've not cleared the columns div, your current code:
<div class="columns">
<div class="content">
... your content ...
</div>
<div class="sidebar">
... your content ...
</div>
</div>
just add <div style="clear:both"></div> after the sidebar div and it works fine:
<div class="columns">
<div class="content">
... your content ...
</div>
<div class="sidebar">
... your content ...
</div>
<div style="clear:both"></div>
</div>
Fix your fotter at the bottom of the page.
#full-width-footer {
border-top: 6px solid #248bbe;
padding-bottom: 120px;
background: #2a2a2a none repeat scroll 0 0;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
}
<div id="full-width-footer">
<div class="container">
<div class="footer">
<div class="footer-left">
<div itemtype="http://schema.org/Attorney" itemscope="">
<span class="ozols" itemprop="name">San Diego Criminal Law Center</span>
<div itemtype="http://schema.org/PostalAddress" itemscope="" itemprop="address">
<span itemprop="streetAddress">1230 Columbia Street Suite 565A</span><br/>
<span itemprop="addressLocality">San Diego</span>
,
<span itemprop="addressRegion">CA</span>
<span itemprop="postalCode">92101</span>
</div>
<span itemprop="telephone">(619) 525-7006</span>
</div>
Los Angeles Accident Law Center © 2017. All Rights Reserved.
</div>
<div class="footer-right">

How to align a text below a picture at the center of the div horizontally

I am making my pageresponsive for the screen size (max-width: 991px) to (min-width: 768px). Here i have a picture and some text below it i want it be aligned horizontally at the center:-
<div class="col-lg-2 pictures_titles" >
<img class="team_img" src="../assets/img/Website-Png/About-Us-01-3.png">
<br><br>
<div class="name_titles">
<span id="namess" style="color:white;"><p> JAMES WILLIAMS </p></span>
<br>
<span id="storys1" style="color:white;">
<p> An experienced strategist and entrepreneur, he is the Founder and Managing Director
of gorb.</p> </span>
</div>
</div>
text-align: center will center text and inline elements
Note, it is not allowed with p elements inside span, so I changed span to div
.pictures_titles {
background: gray;
text-align: center;
}
<div class="col-lg-2 pictures_titles">
<img class="team_img" src="http://placehold.it/300x150">
<br><br>
<div class="name_titles">
<div id="namess" style="color:white;">
<p> JAMES WILLIAMS </p>
</div>
<br>
<div id="storys1" style="color:white;">
<p> An experienced strategist and entrepreneur, he is the Founder and Managing Director of gorb.</p>
</div>
</div>
</div>
If you want the text to be within the boundaries of the image, you could do like this, using display: table-caption
body {
background: gray;
}
.pictures_titles {
display: table;
margin: 0 auto;
text-align: center;
}
.name_titles {
display: table-caption;
}
<div class="col-lg-2 pictures_titles">
<div class="name_titles">
<img class="team_img" src="http://placehold.it/300x150">
<br><br>
<div id="namess" style="color:white;">
<p> JAMES WILLIAMS </p>
</div>
<br>
<div id="storys1" style="color:white;">
<p> An experienced strategist and entrepreneur, he is the Founder and Managing Director of gorb.</p>
</div>
</div>
</div>
Well, you could easily do that with CSS of course.
.name_titles {
text-align:center;
}
If you want to make image at center and text below it also aligned to center then use-
<div class="col-lg-2 pictures_titles" style="text-align:center;">
<img class="team_img" src="../assets/img/Website-Png/About-Us-01-3.png">
<br><br>
<div class="name_titles">
<span id="namess" style="color:white;"><p> JAMES WILLIAMS </p></span>
<br>
<div id="storys1" style="color:white;">
<p> An experienced strategist and entrepreneur, he is the Founder and Managing Director
of gorb.</p> </div>
</div>
</div>

Unable to separate 2 div rows

I just started learning HTML and CSS, and am having trouble figuring our how to include a horizontal space to separate both rows, and fix the misalignment/sizing problem. Both rows are currently attached together, and when I remove <div class="row" style="padding-top: 50px">, the misalignment is fixed but the rows are still together.
Can any one help me out?
HTML:
<div id="featuredcities">
<div class="col-sm-3">
<img id="image" src="images/singapore.jpg" alt="singapore">
<p id="text">Singapore</p>
<p id="summarytext">Amazing culinary experience and <br>efficient business ecosystem in this <br>tiny cosmopolitan country.</p>
</div>
<div class="col-sm-3">
<img id="image" src="images/bangkok.jpg" alt="bangkok">
<p id="text">Bangkok</p>
<p id="summarytext">A bustling neon-lit city that combines tradition and modernity.</p>
</div>
<div class="col-sm-3">
<img id="image" src="images/shanghai.jpg" alt="shanghai">
<p id="text">Shanghai</p>
<p id="summarytext">Blend of East meets West <br>in this high energy metropolis.</p>
</div>
<div class="col-sm-3">
<img id="image" src="images/hcmc.jpg" alt="ho chi minh city">
<p id="text">HCMC</p>
<p id="summarytext">The "Paris of Asia", Ho Chi Minh City is <br>as much historical as it is modern.</p>
</div>
</div><!--End of 1st div row-->
<!--2nd div row-->
<div class="row" style="padding-top: 50px">
<div class="col-sm-3">
<img id="image" src="images/seoul.jpg" alt="seoul">
<p id="text">Seoul</p>
<p id="summarytext">Famous for pop culture, <br>vibrant shopping and <br>historical palaces.</p>
</div>
<div class="col-sm-3">
<img id="image" src="images/bangkok.jpg" alt="bangkok">
<p id="text">Bangkok</p>
<p id="summarytext">A bustling neon-lit city that combines tradition and modernity.</p>
</div>
<div class="col-sm-3">
<img id="image" src="images/shanghai.jpg" alt="shanghai">
<p id="text">Shanghai</p>
<p id="summarytext">Blend of East meets West <br>in this high energy metropolis.</p>
</div>
<div class="col-sm-3">
<img id="image" src="images/hcmc.jpg" alt="ho chi minh city">
<p id="text">HCMC</p>
<p id="summarytext">The "Paris of Asia", Ho Chi Minh City is <br>as much historical as it is modern.</p>
</div>
</div><!--End of 1st div row-->
</div><!--End of Community-->
</section>
CSS:
#images .col-md-3 {
height: 570px;
overflow: hidden;
}
You have this HTML for your first div
<div id="featuredcities">
Add the class row to it.
<div class="row" id="featuredcities">
<div class="row" id="featuredcities">
<div class="col-sm-3">
<img id="image" src="images/singapore.jpg" alt="singapore">
<p id="text">Singapore</p>
<p id="summarytext">Amazing culinary experience and <br>efficient business ecosystem in this <br>tiny cosmopolitan country.</p>
</div>
<div class="col-sm-3">
<img id="image" src="images/bangkok.jpg" alt="bangkok">
<p id="text">Bangkok</p>
<p id="summarytext">A bustling neon-lit city that combines tradition and modernity.</p>
</div>
<div class="col-sm-3">
<img id="image" src="images/shanghai.jpg" alt="shanghai">
<p id="text">Shanghai</p>
<p id="summarytext">Blend of East meets West <br>in this high energy metropolis.</p>
</div>
<div class="col-sm-3">
<img id="image" src="images/hcmc.jpg" alt="ho chi minh city">
<p id="text">HCMC</p>
<p id="summarytext">The "Paris of Asia", Ho Chi Minh City is <br>as much historical as it is modern.</p>
</div>
</div>
<!--End of 1st div row-->
<!--2nd div row-->
<div class="row" style="padding-top: 50px"> <!-- padding top is all you need -->
<div class="col-sm-3">
<img id="image" src="images/seoul.jpg" alt="seoul">
<p id="text">Seoul</p>
<p id="summarytext">Famous for pop culture, <br>vibrant shopping and <br>historical palaces.</p>
</div>
<div class="col-sm-3">
<img id="image" src="images/bangkok.jpg" alt="bangkok">
<p id="text">Bangkok</p>
<p id="summarytext">A bustling neon-lit city that combines tradition and modernity.</p>
</div>
<div class="col-sm-3">
<img id="image" src="images/shanghai.jpg" alt="shanghai">
<p id="text">Shanghai</p>
<p id="summarytext">Blend of East meets West <br>in this high energy metropolis.</p>
</div>
<div class="col-sm-3">
<img id="image" src="images/hcmc.jpg" alt="ho chi minh city">
<p id="text">HCMC</p>
<p id="summarytext">The "Paris of Asia", Ho Chi Minh City is <br>as much historical as it is modern.</p>
</div>
</div>
<!--End of 2st div row-->
always try to keep your code cleaner.. I recommend you you study really good bootstrap grid system Bootstrap-grid
edit:
Your images ID is "image" , and in your css you're calling "#images" ... ?
You could either change it from padding-top to margin-top, or you could also add in a tag in between the two divs.

CSS columns floating blocks right

I have a block grid that I am using CSS columns with to try and create a masonry effect. I've achieved that so far, however the last block item always seems to float to the right.
What I have done so far is
1) on the block grid container set
.blog-grid {
width: 100%;
overflow: hidden;
margin-bottom: rem-calc(20);
-webkit-column-count: 3;
-webkit-column-gap: 30px;
-webkit-column-fill: auto;
-moz-column-count: 3;
-moz-column-gap: 30px;
-moz-column-fill: auto;
column-count: 3;
column-gap: 30px;
column-fill: auto;
}
2) and on the block
.blog-item {
-webkit-column-break-inside:
-moz-column-break-inside:
column-break-inside: avoid;
}
3) Here is the PHP/HTML
<section class="blog-grid">
<div class="blog-item no-custom-style">
<article class="border half-orange">
<a href="http://yesplus.al.home.dev/news/rvc-management-committee/">
<img src="" alt="RVC Management Committee">
</a>
<div class="content">
<h3 class="orange">RVC Management Committee</h3>
<h3 class="orange">17-09-2015</h3>
<p>In February 2015, our CEO, Graham Godden was privileged to be invited to become a Surrey School Governor and join… read post</p>
<h3 class="orange">Read more ></h3>
</div>
</article>
</div>
<div class="blog-item no-custom-style">
<article class="border half-teal">
<a href="http://yesplus.al.home.dev/news/international-association-of-women-police-conference-cardiff/">
<img src="" alt="International Association of Women Police Conference, Cardiff">
</a>
<div class="content">
<h3 class="teal">International Association of Women Police Conference, Cardiff</h3>
<h3 class="teal">17-09-2015</h3>
<p>On Monday 24th August, Yes+ Trustee, Jackie Malton, CEO Graham Godden and Senior Practitioner, Marticka Sampson, were delighted to present… read post</p>
<h3 class="teal">Read more ></h3>
</div>
</article>
</div>
<div class="blog-item no-custom-style">
<article class="border half-red">
<a href="http://yesplus.al.home.dev/news/yes-team-building-day/">
<img src="" alt="Yes+ Team Building Day">
</a>
<div class="content">
<h3 class="red">Yes+ Team Building Day</h3>
<h3 class="red">17-09-2015</h3>
<p>Our first Staff Team Building Day took place on 29th July. The aim of the day was to improve morale… read post</p>
<h3 class="red">Read more ></h3>
</div>
</article>
</div>
<div class="blog-item no-custom-style">
<article class="border half-yellow">
<a href="http://yesplus.al.home.dev/news/mcgrath-support-for-yes/">
<img src="" alt="McGrath Support for Yes+">
</a>
<div class="content">
<h3 class="yellow">McGrath Support for Yes+</h3>
<h3 class="yellow">17-09-2015</h3>
<p>Yes+ have been selected from over 150 charities to receive a support package from leading philanthropists Harvey and Allison McGrath.… read post</p>
<h3 class="yellow">Read more ></h3>
</div>
</article>
</div>
</section>
Here's the flexbox approach with your HTML structure, but new CSS:
HTML
<section class="blog-grid">
<div class="blog-item no-custom-style">
<article class="border half-orange"> <a href="http://yesplus.al.home.dev/news/rvc-management-committee/">
<img src="" alt="RVC Management Committee">
</a>
<div class="content"> <h3 class="orange">RVC Management Committee</h3>
<h3 class="orange">17-09-2015</h3>
<p>In February 2015, our CEO, Graham Godden was privileged to be invited to become a Surrey School Governor and join… read post
</p> <h3 class="orange">Read more ></h3>
</div>
</article>
</div>
<div class="blog-item no-custom-style">
<article class="border half-teal"> <a href="http://yesplus.al.home.dev/news/international-association-of-women-police-conference-cardiff/">
<img src="" alt="International Association of Women Police Conference, Cardiff">
</a>
<div class="content"> <h3 class="teal">International Association of Women Police Conference, Cardiff</h3>
<h3 class="teal">17-09-2015</h3>
<p>On Monday 24th August, Yes+ Trustee, Jackie Malton, CEO Graham Godden and Senior Practitioner, Marticka Sampson, were delighted to present… read post
</p> <h3 class="teal">Read more ></h3>
</div>
</article>
</div>
<div class="blog-item no-custom-style">
<article class="border half-red"> <a href="http://yesplus.al.home.dev/news/yes-team-building-day/">
<img src="" alt="Yes+ Team Building Day">
</a>
<div class="content"> <h3 class="red">Yes+ Team Building Day</h3>
<h3 class="red">17-09-2015</h3>
<p>Our first Staff Team Building Day took place on 29th July. The aim of the day was to improve morale… read post
</p> <h3 class="red">Read more ></h3>
</div>
</article>
</div>
<div class="blog-item no-custom-style">
<article class="border half-yellow"> <a href="http://yesplus.al.home.dev/news/mcgrath-support-for-yes/">
<img src="" alt="McGrath Support for Yes+">
</a>
<div class="content"> <h3 class="yellow">McGrath Support for Yes+</h3>
<h3 class="yellow">17-09-2015</h3>
<p>Yes+ have been selected from over 150 charities to receive a support package from leading philanthropists Harvey and Allison McGrath.… read post
</p> <h3 class="yellow">Read more ></h3>
</div>
</article>
</div>
</section>
CSS
.blog-grid {
display:flex;
flex-direction:row;
flex-wrap:wrap;
justify-content:flex-start;
align-content:flex-start;
}
.blog-item {
flex:1 0 33.3333%;
padding:25px;
box-sizing:border-box;
}
Fiddle
http://jsfiddle.net/08vp50fL/
This will give you a pseudo masonry affect and keeps content left aligned once the wrap occurs. Hopefully this helps you out.