Unable to separate 2 div rows - html

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.

Related

How to center multiple divs within a section?

I know there is an existing question none of the solutions seem to work for me and it's a question posted in 2014.
Here's the code I have:
<section id="team-block">
<div class="team-block-centered">
<div class="col-lg-3 col-sm-6 member-1">
<div class="team-member">
<img
src="http://lvsmiledesigners.com/new/wp-content/uploads/2019/06/dr-tongsiri.jpg"
data-original="http://lvsmiledesigners.com/new/wp-content/uploads/2019/06/dr-tongsiri.jpg"
alt=""
class="lazy"
style="display: block;"
/>
<div class="inner">
<h4 class="name">Dr. Amy Tongsiri</h4>
<p class="position">
<small>Clinical Director</small>
</p>
</div>
<div class="hover">
<div class="description">
<p>
Dr. Amy Tongsiri has joined Smile Designers of Las Vegas in 2017.
She has a joyous energy vibrating the room as she enters. Almost
permanently smiling, she exudes positivity and can easily relaxed
and soothe a nervous patient. The desire to pursue a career in
dentistry came young for Dr. Tongsiri, during the course of her
own dental health. "I originally wanted to do orthodontics, when I
had braces,” she says, flashing the resulting perfect smile. “But
eventually, I found General Dentistry to be more exciting because
you are challenged by being able to cover everything."
</p>
</div>
<div class="read-more">
<a href="/new/dr-amy-tongsiri/" class="button white outline"
>Read more <span class="nc-icon-glyph arrows-1_bold-right"></span
></a>
</div>
</div>
<!--.hover-->
</div>
<!--.team-member-->
</div>
<!--.col-lg-3-->
</div>
<div class="col-lg-3 col-sm-6 member-2">
<div class="team-member">
<img
src="http://lvsmiledesigners.com/new/wp-content/uploads/2019/07/Dr-Dominique-Dela-Cruz.jpg"
data-original="http://lvsmiledesigners.com/new/wp-content/uploads/2019/07/Dr-Dominique-Dela-Cruz.jpg"
alt=""
class="lazy"
style="display: block;"
/>
<div class="inner">
<h4 class="name">Dr. Dominique Dela Cruz</h4>
<p class="position">
<small>Lead Dentist</small>
</p>
</div>
<div class="hover">
<div class="description">
<p>
Providing comprehensive dental care that is tailored to each and
every patient’s needs is Dr. Dominique Dela Cruz’s goal when it
comes to treating patients. She strives to provide dental care in a
comfortable environment while using the most innovative and advanced
technology. Dr. Dela Cruz grew up in Las Vegas, NV. On her spare
time, she likes to stay outdoors as much as possible. She loves to
hike, travel, kayak and snowboard. She also likes to read books and
watch movies with her dogs. Like most of her patients, Dr. Dela Cruz
has a sweet tooth and enjoys eating candy, chocolate and other
pastries.
</p>
</div>
<div class="read-more">
<a href="/new/dr-jorge-jimenez-marquez/" class="button white outline"
>Read more <span class="nc-icon-glyph arrows-1_bold-right"></span
></a>
</div>
</div>
<!--.hover-->
</div>
<!--.team-member-->
</div>
<!--.col-lg-3-->
<div class="col-lg-3 col-sm-6 member-3">
<div class="team-member">
<img
src="http://lvsmiledesigners.com/new/wp-content/uploads/2019/06/karla.jpg"
data-original="http://lvsmiledesigners.com/new/wp-content/uploads/2019/06/karla.jpg"
alt=""
class="lazy"
style="display: block;"
/>
<div class="inner">
<h4 class="name">Karla Brown</h4>
<p class="position">
<small>Office Manager</small>
</p>
</div>
<div class="hover">
<div class="description">
<p>
Delivering outstanding customer service has always been an essential
part of a day’s work for Karla. As Smile Designers of Las Vegas
Office Manager, she is responsible for all office procedures, and
uses her organizational skills to ensure smooth operations in a busy
work environment.
</p>
</div>
<div class="read-more">
<a href="/new/nancy-gutierrez/" class="button white outline"
>Read more <span class="nc-icon-glyph arrows-1_bold-right"></span
></a>
</div>
</div>
<!--.hover-->
</div>
<!--.team-member-->
</div>
<!--.col-lg-3-->
<div class="col-lg-3 col-sm-6 member-4">
<div class="team-member">
<img
src="http://lvsmiledesigners.com/new/wp-content/uploads/2019/06/nancy.jpg"
data-original="http://lvsmiledesigners.com/new/wp-content/uploads/2019/06/nancy.jpg"
alt=""
class="lazy"
style="display: block;"
/>
<div class="inner">
<h4 class="name">Nancy Gutierrez</h4>
<p class="position">
<small>Lead Back Office Assistant</small>
</p>
</div>
<div class="hover">
<div class="description">
<p>
As Smile Designers of Las Vegas lead dental assistant she says her
coworkers and easy-going patients make it a pleasure to go to work
every day. She loves been a part in patients journeys to a better
and healthier oral health.
</p>
</div>
<div class="read-more">
<a href="/new/karla-brown/" class="button white outline"
>Read more <span class="nc-icon-glyph arrows-1_bold-right"></span
></a>
</div>
</div>
<!--.hover-->
</div>
<!--.team-member-->
</div>
<!--.col-lg-3-->
</section>
Here's the live site: http://lvsmiledesigners.com/new/
The section is under the "Our team can help you!" header. The concern I have is Dr. Amy's div. I'm not sure why Dr. Amy's image is narrower in width than the other images.
[Update]: You should wrap all the doctors column with .team-block-centered to positioning them center. In your demo live site - you only wrap Dr. Amy div.
See your code, all the element with col-lg-3 class aren't siblings, instead Dr. Amy div element nested in .team-block-centered element. And thats the main reason. If you remove parent wrapper with class .team-block-centered, everything will be fine.
[Previous]:
.team-block-centered parent wrapper class has width 900px. And col-lg-3 class take the width of 20%(234px in this case).
The problem is you have 4 column width of 20% * 4 = 80%(234 * 4 = 936px), which is greater than parent wrapper width.
Give .team-block-centered class width: 100% , and then center it.
In other words image is very short in width = 173px original, it should more than 204px.

Newbie - Content not staying in container

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>

how to fit both text and image in a row using 2 col-md-6

<style>
.backgroundcolor1 {
background-color: #567892;
}
</style>
<section>
<div class="row" align="center">
<div class="col-md-12 backgroundcolor1">
<div class="col-md-6 col-sm-6">
<div class="col-md-10 col-lg-offset-1 ">
<br>
<img src="assets/images/SPA/Icons/facials.png" class="icons" alt=""><br>
<h3>FACIALS</h3>
<p align="justify">Have you ever treated to a facial?<br> Facial treatments feel good, offering soothing relaxation, according to Day Spas. Facial massage treatments increase circulation and the flow of blood, and they include a variety of cremes,
aromatherapy and oils that moisturize the skin, smell good, and relieve stress as well as encourage peace of mind and contentment</p>
</div>
</div>
<div class="col-md-6 col-sm-6 textbox">
<img src="assets/images/SPA/facial.jpg" style="height: 100%; width: 100%; object-fit: contain;opacity:0.9;padding:0;margin:0; " alt="">
<figcaption><br><br><br>
<h3>Facials</h3>
</figcaption>
[enter image description here][1]
</div>
</div>
</div>
</section>
I am getting proper image fitting to text.. after i start resizing my image start reducing and there will be gap like the below image. i don't want it to happen for all the devices. my entire site is in this manner only. i don't want that extra background showing at the right side of the image.can anybody help me to solve this problem.
you can create row inside col-md-6 and define column that you want like
<div class="col-md-6 col-sm-6 textbox">
<div class="row">
<div class="col-md-7 col-sm-6">
<img src="">
</div>
<div class="col-md-5 col-sm-6">
<p>Text goes here.....</p>
<p>ddescription goes here</p>
</div>
</div>
</div>
you can print text first and image in second and change col length with your need. I hope this is what you need if not please try to clarify your question.
Please check this
.backgroundcolor1 {
background-color: #567892;
}
.back_imag{position:absolute !important; background:url(http://via.placeholder.com/500x400) no-repeat; background-size:cover; background-position:center center; left:0px; top:0px; bottom:0px;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
<section class="container">
<div class="row" align="center">
<div class="col-xs-12 backgroundcolor1">
<div class="col-xs-6 col-sm-6">
<div class="col-md-10 col-lg-offset-1 ">
<br>
<img src="assets/images/SPA/Icons/facials.png" class="icons" alt=""><br>
<h3>FACIALS</h3>
<p align="justify">Have you ever treated to a facial?<br> Facial treatments feel good, offering soothing relaxation, according to Day Spas. Facial massage treatments increase circulation and the flow of blood, and they include a variety of cremes,
aromatherapy and oils that moisturize the skin, smell good, and relieve stress as well as encourage peace of mind and contentment</p>
</div>
</div>
<div class="col-xs-6 col-sm-6 textbox back_imag col-xs-offset-6">
<img src="" class="" alt="">
<figcaption><br><br><br>
<h3>Facials</h3>
</figcaption>
[enter image description here][1]
</div>
</div>
</div>
</section>

Don't show background image in entire row

I'm trying to show an image full width in the background of three columns. I thought if I wrapped the three columns in a div and put a background on the div, it would happen, instead it showing the background on the entire screen. How do I make it so it just shows in the background below the hr line.
So I don't want the background to show in the sections:
What is an Apple?
The apple tree (Malus domestica) is a deciduous tree in the rose family best known for its sweet, pomaceous fruit, the apple.
Here's my bootply:
http://www.bootply.com/BT0SWRh3aq
Here's my html:
<div class="content-section-a">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2>What is an Apple?</h2>
<p>The apple tree (Malus domestica) is a deciduous tree in the rose family best known for its sweet, pomaceous fruit, the apple.</p>
<hr class="section-heading-spacer">
<div class="clearfix"></div>
</div>
<div class="row" id="bg-pink-data-points">
<div class="col-md-4 col-xs-12">
<h3>LADY</h3>
<p>One of the oldest known varieties, this tiny apple is said to have gotten its name because women would keep them in their purses to sniff when they encountered bad odors.</p>
</div>
<div class="col-md-4 col-xs-12">
<h3>GRANNY SMITH</h3>
<p>The Baldwin was among the most popular American apples until 1934, when a freeze wiped out most of its trees.</p>
</div>
<div class="col-md-4 col-xs-12">
<h3>GOLDEN DELICIOUS</h3>
<p>This heirloom hails from Denmark, but in the United States, it's grown almost exclusively in Sonoma County, CA, where it's celebrated with an annual festival. </p>
</div>
</div>
</div>
<!-- /.container -->
</div></div>
Here's a CSS:
#bg-pink-data-points {
background-image: url("http://10steps.sg/wp-content/uploads//2012/11/White-christmas-light-background.jpg");
}
.content-section-a {
padding: 50px 0;
}
It looks like you have minor disturbance in your HTML Structure .row in another .row, well you can try this:
<div class="content-section-a">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2>What is an Apple?</h2>
<p>The apple tree (Malus domestica) is a deciduous tree in the rose family best known for its sweet, pomaceous fruit, the apple.</p>
<hr class="section-heading-spacer">
<div class="clearfix"></div>
</div>
</div>
<div class="row" id="bg-pink-data-points">
<div class="col-md-4 col-xs-12">
<h3>LADY</h3>
<p>One of the oldest known varieties, this tiny apple is said to have gotten its name because women would keep them in their purses to sniff when they encountered bad odors.</p>
</div>
<div class="col-md-4 col-xs-12">
<h3>GRANNY SMITH</h3>
<p>The Baldwin was among the most popular American apples until 1934, when a freeze wiped out most of its trees.</p>
</div>
<div class="col-md-4 col-xs-12">
<h3>GOLDEN DELICIOUS</h3>
<p>This heirloom hails from Denmark, but in the United States, it's grown almost exclusively in Sonoma County, CA, where it's celebrated with an annual festival. </p>
</div>
</div>
</div>
<!-- /.container -->
</div>
Demo URL: http://www.bootply.com/0m5JJ6pMM0
If you wants to play with Background to be extend, you can also play with the same CSS property which is styled for Background #bg-pink-data-points:
#bg-pink-data-points {
background-image: url("http://10steps.sg/wp-content/uploads//2012/11/White-christmas-light-background.jpg");
padding: 10px;
}
You can play with some more options as well. Demo URL:
http://www.bootply.com/Poi6HlXOa8
Please wrap .col-lg-12 in a row to set its proper layout..
<div class="content-section-a">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2>What is an Apple?</h2>
<p>The apple tree (Malus domestica) is a deciduous tree in the rose family best known for its sweet, pomaceous fruit, the apple.</p>
<hr class="section-heading-spacer">
</div>
</div>
<div class="row" id="bg-pink-data-points">
<div class="col-md-4 col-xs-12">
<h3>LADY</h3>
<p>One of the oldest known varieties, this tiny apple is said to have gotten its name because women would keep them in their purses to sniff when they encountered bad odors.</p>
</div>
<div class="col-md-4 col-xs-12">
<h3>GRANNY SMITH</h3>
<p>The Baldwin was among the most popular American apples until 1934, when a freeze wiped out most of its trees.</p>
</div>
<div class="col-md-4 col-xs-12">
<h3>GOLDEN DELICIOUS</h3>
<p>This heirloom hails from Denmark, but in the United States, it's grown almost exclusively in Sonoma County, CA, where it's celebrated with an annual festival. </p>
</div>
</div>
<!-- /.container -->
Remove the float: left; on the <div class="col-lg-12"> or overwrite it with float: none;

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.