centering block of images on all screen sizes bootstrap - html

I am using bootstrap to center a block of social icons underneath h1 text on all screen sizes. I almost got it, there are just 2 sizes where it keeps shifting.
Here is how it looks where it is shifted to the left slightly
here it's shifted to the right slightly
Here is my code:
<div id="container">
<div class="social-and-coming">
<div class="coming-soon text-center ">
<h1 class="coming ">Coming Soon</h1>
</div>
<div class="row">
<ul class="col-md-offset-3 col-md-11 col-sm-offset-3 col-sm-11 col-xs-offset-1 col-xs-11">
<li class="col-xs-1 col-sm-1 col-md-1"><img src="/wp-content/themes/avaziomedia/Facebook.png" alt=""></li>
<li class="col-xs-1 col-sm-1 col-md-1"><img src="/wp-content/themes/avaziomedia/Twitter.png" alt=""></li>
<li class="col-xs-1 col-sm-1 col-md-1"><img src="/wp-content/themes/avaziomedia/Instagram.png" alt=""></li>
<li class="col-xs-1 col-sm-1 col-md-1"><img src="/wp-content/themes/avaziomedia/Youtube.png" alt=""></li>
<li class="col-xs-1 col-sm-1 col-md-1"><img src="/wp-content/themes/avaziomedia/pinterest.png" alt=""></li>
</ul>
</div>
</div>
</div>
and here is my css:
#container{
// min-height:100%;
position:relative;
}
.site-title a{
font-family: Heiti TC;
color: #E8970C;
}
.text-center{
color: #E8970C;
}
.coming-soon h1{
font-family: Heiti TC;
font-size: 75px;
}
.row{
// width:700px;
margin: 0px auto;
}
.col-xs-1{
margin-left: 15px;
}
li{
margin-right: 20px;
margin-top: 20px;
}
img{
width:40px;
}
any help would be greatly appreciated!

Just remove the list and use text-center like you did for the title, it should work:
<div id="container">
<div class="social-and-coming">
<div class="coming-soon text-center">
<h1 class="coming">Coming Soon</h1>
</div>
<div class="text-center">
<img src="/wp-content/themes/avaziomedia/Facebook.png" alt="">
<img src="/wp-content/themes/avaziomedia/Twitter.png" alt="">
<img src="/wp-content/themes/avaziomedia/Instagram.png" alt="">
<img src="/wp-content/themes/avaziomedia/Youtube.png" alt="">
<img src="/wp-content/themes/avaziomedia/pinterest.png" alt="">
</div>
</div>
</div>

You are using some bootstrap offsets and so it will never be in the middle. I would suggest simplifying this and getting rid of the UL classes and add an id to it which applies the following CSS:
#socialLinks {
list-style:none;
text-align: center;
}
#socialLinks li {
margin: 0;
display: inline-block;
float: none;
}
jsFiddle demo
#container {
// min-height:100%;
position: relative;
}
.site-title a {
font-family: Heiti TC;
color: #E8970C;
}
.text-center {
color: #E8970C;
}
.coming-soon h1 {
font-family: Heiti TC;
font-size: 75px;
}
.row {
// width:700px;
margin: 0px auto;
}
.col-xs-1 {
margin-left: 15px;
}
li {
margin-right: 20px;
margin-top: 20px;
}
img {
width: 40px;
}
#socialLinks {
list-style:none;
text-align: center;
}
#socialLinks li {
margin: 0;
display: inline-block;
float: none;
}
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div id="container">
<div class="social-and-coming">
<div class="coming-soon text-center ">
<h1 class="coming ">Coming Soon</h1>
</div>
<div class="row">
<ul id="socialLinks">
<li class="col-xs-1 col-sm-1 col-md-1">
<img src="https://placehold.it/100x100" alt="">
</li>
<li class="col-xs-1 col-sm-1 col-md-1">
<img src="https://placehold.it/100x100" alt="">
</li>
<li class="col-xs-1 col-sm-1 col-md-1">
<img src="https://placehold.it/100x100" alt="">
</li>
<li class="col-xs-1 col-sm-1 col-md-1">
<img src="https://placehold.it/100x100" alt="">
</li>
<li class="col-xs-1 col-sm-1 col-md-1">
<img src="https://placehold.it/100x100" alt="">
</li>
</ul>
</div>
</div>
</div>

It's quite easy:
.yourclass {
width: SPECIFY_WIDTH;
margin: 0 auto;
}
It will always center irresepctive of any screen size. If you want spacing around on small devices then add padding to class.

Can you not use Bootstraps Div class helpers?
class: Text-center (text)
Class: center-block (images)
They seem to work for me, i dont do offsets much so not 100% how effective they will be.

Related

How to align center <li> tag?

Look at my screenshot, How can I move these two elements in the center.
The elements are .
I did almost anything but not working.
Anybody could help? Text-align: center not working either
.setup-box {
margin-left: 1em;
}
.treeview-box-title {
padding-top: .5em;
margin-top: 1.5em;
}
.treeview-container {
display: flex;
justify-content: space-between;
}
.treeview-ul {
margin: 0 1em 0 1.5em;
text-align: left;
}
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-4">
<div class="setup-box">
<h4 class="treeview-box-title">Windows</h4>
<div class="treeview-container">
<ul class="treeview-ul">
<li>
Download Application
</li>
</ul>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-4 col-md-4">
<div class="setup-box">
<h4 class="treeview-box-title">Android</h4>
<div class="treeview-container">
<ul class="treeview-ul">
<li>Google PlayStore</li>
</ul>
</div>
</div>
</div>
</div>
add to your div.row d-flex and justify content:
<div class="row mx-auto d-flex justify-content-center">
.setup-box {
margin-left: 1em;
border:1px solid blue;
border-radius:0.5em;
}
.m-g-b{
margin-bottom:20px;
}
.windows-header{
border-bottom:1px solid blue;
}
.android-header{
border-bottom:1px solid blue;
}
.treeview-box-title {
text-align:center;
}
.treeview-container {
display: flex;
padding:0.1em;
}
.treeview-ul {
text-align: left;
}
<div class="row m-g-b">
<div class="col-xs-12 col-sm-4 col-md-4">
<div class="setup-box">
<div class="windows-header">
<h4 class="treeview-box-title">Windows</h4>
</div>
<div class="treeview-container">
<ul class="treeview-ul">
<li>
Download Application
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-4">
<div class="setup-box">
<div class="android-header">
<h4 class="treeview-box-title">Android</h4>
</div>
<div class="treeview-container">
<ul class="treeview-ul">
<li>Google PlayStore</li>
</ul>
</div>
</div>
</div>
</div>

Bootstrap columns shrink instead of stacking

On my landing page, we have a "Media Resource" section with links to videos, support materials and social media. Currently, the content in the section shrinks when the window is resized rather than the wanted outcome of stacking.
To be clear, the Videos, Support, and Social are what should be stacking. The heading of the section is perfectly fine.
I've looked through the HTML and CSS for the section but can't seem to pinpoint what's causing them not to stack like desired. Below is the HTML and CSS for what's being worked on.
HTML
<div class="container-fluid no-gutters media-resource-wrapper">
<div class="row">
<div class="col-12 col-lg-4 text-center">
<h2 class="boxheader-lead">Media & Public Relations Resource Center</h2>
</div>
<div class="col-3 col-lg-2">
<img src="~/Images/Video.png" alt="videos" class="img-fluid media-icon video" />
</div>
<div class="col-6 col-lg-4">
<img src="~/Images/Materials.png" alt="support materials" class="img-fluid" />
</div>
<div class="col-3 col-lg-2">
<img src="~/Images/Social.png" alt="social" class="img-fluid media-icon social" />
</div>
</div>
</div>
CSS
.media-resource-wrapper {
background-color: #00b9f2;
padding: 60px 0;
}
.media-resource-wrapper > .row {
margin: 0 10px;
}
.media-resource-wrapper h2 {
margin-bottom: 30px;
color: #fff;
font-weight: bold;
n-bottom: 30px;
color: #fff;
font-weight: bold;
}
/* Media resourse icon positioning */
.media-resource-wrapper .media-icon {
position: relative;
top: 20px;
}
#media (min-width: 992px) {
.health-professionals-block .boxheader-landing {
left: 30px;
margin-top: 250px;
width: 20%;
}
.boxheader-landing h1, .boxheader-landing h2 {
font-size: 1.75em;
}
.boxheader-landing-copy {
font-size: .9em;
}
.media-resource-wrapper h2 {
margin-top: 40px;
border-right: 1px solid #fff;
padding-right: 30px;
}
.media-resource-wrapper .media-icon {
top: 30px;
}
.media-resource-wrapper {
padding: 60px 0 60px 0;
}
}
UPDATE
I made a change that was recommended but the images below shows how it looks by default and then when I shrink.
Standard Size:
Smaller window:
Use standard bootstrap class col-sm-3 and col-sm-6.
Replace the URL with your image and it will stack.
.media-resource-wrapper {
background-color: #00b9f2;
padding: 60px 0;
}
.media-resource-wrapper>.row {
margin: 0 10px;
}
.media-resource-wrapper h2 {
margin-bottom: 30px;
color: #fff;
font-weight: bold;
n-bottom: 30px;
color: #fff;
font-weight: bold;
}
/* Media resourse icon positioning */
.media-resource-wrapper .media-icon {
position: relative;
top: 20px;
}
#media (min-width: 992px) {
.health-professionals-block .boxheader-landing {
left: 30px;
margin-top: 250px;
width: 20%;
}
.boxheader-landing h1,
.boxheader-landing h2 {
font-size: 1.75em;
}
.boxheader-landing-copy {
font-size: .9em;
}
.media-resource-wrapper h2 {
margin-top: 40px;
border-right: 1px solid #fff;
padding-right: 30px;
}
.media-resource-wrapper .media-icon {
top: 30px;
}
.media-resource-wrapper {
padding: 60px 0 60px 0;
}
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta.2/css/bootstrap.css" rel="stylesheet" />
<div class="container-fluid no-gutters media-resource-wrapper">
<div class="row">
<div class="col-sm-12 col-lg-4 text-center">
<h2 class="boxheader-lead">Media & Public Relations Resource Center</h2>
</div>
<div class="col-sm-3 col-lg-2">
<img src="https://lh3.googleusercontent.com/gN6iBKP1b2GTXZZoCxhyXiYIAh8QJ_8xzlhEK6csyDadA4GdkEdIEy9Bc8s5jozt1g=w300" alt="videos" class="img-fluid media-icon video" />
</div>
<div class="col-sm-6 col-lg-4">
<img src="https://lh3.googleusercontent.com/gN6iBKP1b2GTXZZoCxhyXiYIAh8QJ_8xzlhEK6csyDadA4GdkEdIEy9Bc8s5jozt1g=w300" alt="support materials" class="img-fluid" />
</div>
<div class="col-sm-3 col-lg-2">
<img src="https://lh3.googleusercontent.com/gN6iBKP1b2GTXZZoCxhyXiYIAh8QJ_8xzlhEK6csyDadA4GdkEdIEy9Bc8s5jozt1g=w300" alt="social" class="img-fluid media-icon social" />
</div>
</div>
</div>
<div class="container-fluid no-gutters media-resource-wrapper">
<div class="row">
<div class="col-12 text-center">
<h2 class="boxheader-lead">Media & Public Relations Resource
Center</h2>
</div>
</div>
<div class="row">
<div class="col-3 ">
<img src="~/Images/Video.png" alt="videos" class="img-fluid media-
icon video" />
</div>
<div class="col-6 ">
<img src="~/Images/Materials.png" alt="support materials"
class="img-fluid" />
</div>
<div class="col-3 ">
<img src="~/Images/Social.png" alt="social" class="img-fluid
media-icon social" />
</div>
</div>
If you want the columns to stack use col-sm- instead...
https://www.codeply.com/go/kQHOYSTEnL
<div class="container-fluid no-gutters media-resource-wrapper">
<div class="row">
<div class="col-12 col-lg-4 text-center">
<h2 class="boxheader-lead">Media & Public Relations Resource Center</h2>
</div>
<div class="col-sm-3 col-lg-2">
<img src="//placehold.it/200" alt="videos" class="img-fluid media-icon video" />
</div>
<div class="col-sm-6 col-lg-4 text-center">
<img src="//placehold.it/200" alt="support materials" class="img-fluid" />
</div>
<div class="col-sm-3 col-lg-2">
<img src="//placehold.it/200" alt="social" class="img-fluid media-icon social" />
</div>
</div>
</div>
As you can see here, the .col- is the smallest breakpoint, so they will continue to shrink horizontally in width. sm is the next size up so they will become full-width, and stack vertically at 576px. If you want the cols to stack at wider widths use col-md-,col-lg- or col-xl-, etc..
<div class="container-fluid no-gutters media-resource-wrapper">
<div class="row">
<div class="col-12 text-center">
<h2 class="boxheader-lead">Media & Public Relations Resource Center</h2>
</div>
<div class="col-3 ">
<img src="~/Images/Video.png" alt="videos" class="img-fluid media-icon video" />
</div>
<div class="col-6 ">
<img src="~/Images/Materials.png" alt="support materials" class="img-fluid" />
</div>
<div class="col-3 ">
<img src="~/Images/Social.png" alt="social" class="img-fluid media-icon social" />
</div>
</div>

Overlapping div, creating unclickable links

My problem is that a div class with bootstrap "navbar" is overlapping my md-12 div however the content is still displayed but not clickable. I have no clue what makes this happens.
DEMO: https://elevarbetensys.se/SY15/MS15/GYARB/index.php
Question: How do i "remove" or change so it can be clickable. My logo and languageselector aren't clickable now.
<div class="container text-center">
<div class="row">
<div id="home">
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4" style="float: left;">
<h6>This restaurant is educational purpose<br>All orders will be considered as donations.</h6>
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4" style="float: left;">
<a href="#home">
<img class="navbar" src="images/Burning_Rooster.png" alt="Burning_Rooster">
</a>
<p>RESTAURANT & LOUNGE BAR</p>
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4" style="float: left;">
<ul class="languagepicker roundborders large navbar-right">
<li><img src="images/flags/us.png"/>English</li>
<li><img src="images/flags/nl.png"/>Nederlands</li>
<li><img src="images/flags/de.png"/>German</li>
<li><img src="images/flags/fr.png"/>Français</li>
<li><img src="images/flags/es.png"/>Español</li>
<li><img src="images/flags/it.png"/>Italiano</li>
<li><img src="images/flags/se.png"/>Svenska</li>
</ul>
</div>
</div>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<i class="fa fa-bars" aria-hidden="true" style="font-size:24px;"></i>
</button>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li>
HOME
</li>
<li>
MENU
</li>
<li>
GALLERY
<li>
RESERVATION
</li>
<li>
REVIEWS
</li>
<li>
CONTACT
</li>
</ul>
</div>
</div>
</nav>
<img src="images/restaurant/welcome.jpg" alt="Welcome" class="img-responsive img-rounded">
<h2>Burning Rooster Since 1969</h2>
<p>14 February 1969, was the year evertying came to place. Our service have been running since.
<br>
At our restaurant we serve you the finest food and desserts. Burning Rooster became popular immediatly with our rooster delicacy.
<br>
People across the whole world came to taste our finest rooster meny. Our meny have gave pleasure to world famous humans like
<br>
Freddy Mercury, Mel Gibson, Kiss and Donald duck creator.
</p>
<hr>
</div>
</div>
CSS:
#home {
height: auto;
margin-right: auto;
margin-left: auto;
width: auto;
text-align: center;
}
.languagepicker {
background-color: #FFF;
display: inline-block;
padding: 0;
height: 40px;
overflow: hidden;
transition: all .3s ease;
margin: 0 0 10px 0;
vertical-align: top;
float: left;
}
.languagepicker:hover {
/* don't forget the 1px border */
height: 81px;
}
.languagepicker a{
color: #000;
text-decoration: none;
font-size: 16px;
}
.languagepicker li {
display: block;
padding: 0px 20px;
line-height: 40px;
border-top: 1px solid #EEE;
}
.languagepicker li:hover{
background-color: #EEE;
}
.languagepicker a:first-child li {
border: none;
background: #FFF !important;
}
.languagepicker li img {
margin-right: 5px;
}
.roundborders {
border-radius: 5px;
}
.large:hover {
/*
don't forget the 1px border!
The first language is 40px heigh,
the others are 41px
*/
height: 286px;
}
Firstly, you're closing your #home as soon as you create it: <div id="home"></div>.
Secondly, I think all you need to do is override the position property of the navbar, which is relative. Assuming nav is child of #home, try the following:
#home > nav {
position: inherit;
}

horizontally center multiple divs within a div in small devices (xs)

My page has 3 div(s) within a div. In tablet and desktop screens they look good (center-aligned), but on a very small device such as cellphone the inner div(s) are left aligned (I want them to be horizontally center aligned). I applied text-center, and center-block to the outer div but it does not work. Any suggestion? Here are the html, and css codes.
.img-responsive {
display: block;
max-width: 100%;
height: auto;
}
portfolio-caption {
max-width: 281px;
background-color: #994ACC;
text-align: center;
padding: 10px;
border-top: 3px solid #ffffff;
margin-bottom: 10px;
}
<div class="row">
<div class="col-md-4 col-sm-6 col-xs-12">
<div style="max-width: 281px">
<a href="#" ">
<img src="./x/pilotproject1.jpg " class="img-responsive " style="margin: 0 auto; " alt=" ">
</a>
<div class="portfolio-caption text-center ">
<strong><h4>Project Name</h4></strong>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12 ">
<div style="max-width: 281px ">
<a href="# ">
<img src="./x/pilotproject2.jpg " class="img-responsive "
style="margin: 0 auto; " alt=" ">
</a>
<div class="portfolio-caption text-center ">
<strong><h4>Project Name</h4></strong>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12 ">
<div style="max-width: 281px ">
<a href="# " class="pilot-link ">
<img src="./x/pilotproject3.jpg " class="img-responsive "
style="margin: 0 auto; " alt=" ">
</a>
<div class="portfolio-caption text-center ">
<strong><h4>Project Name</h4></strong>
</div>
</div>
</div>
</div>
The reason that I have is that the width of the pictures is 281 px, if I do not set the width, the width of the div that comes after the img will be bigger than 281 px which is not something that I want.
as you can see in this picture, the images are all left-aligned
I added a class centered as a container to center elements (please remove the border border: 1px solid red; it is used to show you the container block ):
.centered {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
border: 1px solid red;
}
.img-responsive {
display: block;
max-width: 281px !important;
height: auto;
margin: 0 auto;
}
wrap each element you want to be centered.
Also in your css portfolio-caption should be .portfolio-caption to select a class.
I moved your in-line style to css class img-responsive so you can update your style in one place.
.img-responsive {
display: block;
max-width: 281px !important;
height: auto;
margin: 0 auto;
}
.portfolio-caption {
width: 281px;
background-color: #994ACC;
text-align: center;
padding: 10px;
border-top: 3px solid #ffffff;
margin-bottom: 10px;
float: right;
}
.centered {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
/* border: 1px solid red; */
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="row">
<div class="col-md-4 col-sm-6 col-xs-12">
<div class="centered">
<a href="#">
<img src="http://placehold.it/350x150" class="img-responsive" alt=" ">
</a>
</div>
<div class="centered">
<div class="portfolio-caption text-center ">
<strong><h4>Project Name</h4></strong>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12">
<div class="centered">
<a href="# ">
<img src="http://placehold.it/350x150" class="img-responsive" alt=" ">
</a>
</div>
<div class="centered">
<div class="portfolio-caption">
<strong><h4>Project Name</h4></strong>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12">
<div class="centered">
<a href="# " class="pilot-link ">
<img src="http://placehold.it/350x150" class="img-responsive" alt=" ">
</a>
</div>
<div class="centered">
<div class="portfolio-caption text-center ">
<strong><h4>Project Name</h4></strong>
</div>
</div>
</div>
</div>
You should not apply classes to outer divs, apply them exactly to what you want to be centered : class="img-responsive center-block", and
also check the bootstrap version center-block is new in Bootstrap version 3.0.1 i believe.
Use
Text align : center ;
text-align:center
<div style="max-width: 281px; text-align : center">
Plunker link :
https://plnkr.co/edit/UaW436KiylzfqOCU1cg1?p=preview

Equal height and width boxes in Bootstrap?

I am trying to make the bottom right greyish box (the one without image) same height and width as other boxes with images. It is supposed to be responsive but if I manage to make it fit this resolution it doesn't work in other resolutions. I tried with flexbox but couldn't make it work. I am using Bootstrap as you can see. I also tried using vh and vw but no luck...
I would really appreciate if someone with more experience could tell me the proper way to do this? Thanks all for reading and trying to help!
Here is the screenshot of what I am trying to achieve:
Here is my code so far:
<!-- T E A M S E C T I O N -->
<section id="team" class="no-padding">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 text-center">
<h1><span class="orange">[ </span>Meet Our Team<span class="orange"> ]</span></h1>
<p>A perfect blend of creativity and technical wizardry.</br>The best people formula for great websites!</p>
</div>
</div>
<div class="row no-gutter">
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/1.jpg" title="">
<img src="img/team/1.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/2.jpg" title="">
<img src="img/team/2.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/3.jpg" title="">
<img src="img/team/3.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/4.jpg" title="">
<img src="img/team/4.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/5.jpg" title="">
<img src="img/team/5.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/6.jpg" title="">
<img src="img/team/6.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/7.jpg" title="">
<img src="img/team/7.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/8.jpg" title="">
<img src="img/team/8.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<div class="team-box">
<div class="team-box-last">
<h3>Want to join our team?</h3>
<p>We’re always looking for talented designers, developers, project managers and anyone who’s driven and has a passion for the digital industries.
</p>
<ul>
<li>Check our jobs page</li>
<li>Send us your CV</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
/* -------- TEAM SECTION -------- */
#team{
background-color: #fff;
text-align: center;
width: 100%;
}
#team h1{
color: #345;
font-weight: 700;
margin-top: 50px;
margin-bottom: 50px;
}
#team p{
color: #345;
font-size: 21px;
margin-top: 0px;
margin-bottom: 50px;
padding-left: 15px;
padding-right: 15px;
}
.no-padding {
padding: 0;
}
.no-gutter > [class*=col-] {
padding-right: 0;
padding-left: 0;
}
.team-box {
display: block;
position: relative;
margin: 0 auto;
max-width: 650px;
overflow: hidden;
}
.team-box img{
-moz-transition: all 1s;
-webkit-transition: all 1s;
transition: all 1s;
}
.team-box:hover img {
-moz-transform: scale(1.1);
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
.team-box .team-box-caption {
display: block;
position: absolute;
bottom: 0;
width: 100%;
height: 100%;
text-align: center;
color: #fff;
opacity: 1;
background: transparent;
/* background: rgba(67,208,243,0.9);
-webkit-transition: all .35s;
-moz-transition: all .35s;
transition: all .35s; */
}
.team-box .team-box-caption .team-box-caption-content {
position: absolute;
bottom: 12px;
width: 100%;
text-align: left;
}
.team-box .team-box-caption .team-box-caption-content .name,
.team-box .team-box-caption .team-box-caption-content .position {
padding: 0 15px;
text-shadow: 0px 0px 5px #000;
}
.team-box .team-box-caption .team-box-caption-content .name {
text-transform: uppercase;
font-size: 12px;
font-weight: 700;
}
.team-box .team-box-caption .team-box-caption-content .position {
font-size: 12px;
text-transform: uppercase;
}
.team-box:hover .team-box-caption {
opacity: 1;
}
#media(min-width:768px) {
.team-box .team-box-caption .team-box-caption-content .name {
font-size: 15px;
}
.team-box .team-box-caption .team-box-caption-content .position {
font-size: 15px;
text-transform: uppercase;
}
}
.team-box-last{
text-align: left;
padding: 30px 30px;
}
.team-box:last-child{
background-color: #f3f3f3;
}
#team .team-box-last h3{
color: #345;
padding-top: 15px;
padding-left: 15px;
}
#team .team-box-last p{
font-size: 18px;
line-height: 23px;
padding-top: 15px;
margin-bottom: 30px;
}
#team .team-box-last ul{
padding-left: 15px;
}
#team .team-box-last ul li{
font-size: 18px;
font-weight: 500;
}
#team .team-box-last ul li{
list-style: none;
}
Well, you cannot really achieve this with CSS, you may add some Javascript code using jQuery to make it easier for you.
I am giving you an example just have a look to get an idea. The idea is to get the height of each image box which I have assigned id="getheight" and then add that height to the last box. Remember you need to use overflow:hidden if you want to see same height. I have altered your code and add some class and javascript to give you what you can do.
The problem in responsiveness in the last box is you need to also handle font-size or other stuff to make sure it always appears and perfect which I haven't touched that yet. However, you can still have scrollbar for longer text if you want.
All in all, this is one approach to solve your problem, there maybe more ways if spend more time.
** Please copy and see in bigger screen for responsiveness as well we watch console to see dynamic height. ***
var picHeight = $('#getheight').height();
$('.sameHeight').css('height',picHeight + 'px');
$('.team-box-last').css('height',picHeight + 'px')
$(window).on('resize',function(){
var picHeight = $('#getheight').height();
$('.sameHeight').css('max-height',picHeight + 'px');
})
/* -------- TEAM SECTION -------- */
#team{
background-color: #fff;
text-align: center;
width: 100%;
}
#team h1{
color: #345;
font-weight: 700;
margin-top: 50px;
margin-bottom: 50px;
}
#team p{
color: #345;
font-size: 21px;
margin-top: 0px;
margin-bottom: 50px;
padding-left: 15px;
padding-right: 15px;
}
.no-padding {
padding: 0;
}
.no-gutter > [class*=col-] {
padding-right: 0;
padding-left: 0;
}
.team-box {
display: block;
position: relative;
margin: 0 auto;
max-width: 650px;
overflow: hidden;
}
.team-box img{
-moz-transition: all 1s;
-webkit-transition: all 1s;
transition: all 1s;
}
.team-box:hover img {
-moz-transform: scale(1.1);
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
.team-box .team-box-caption {
display: block;
position: absolute;
bottom: 0;
width: 100%;
height: 100%;
text-align: center;
color: #fff;
opacity: 1;
background: transparent;
/* background: rgba(67,208,243,0.9);
-webkit-transition: all .35s;
-moz-transition: all .35s;
transition: all .35s; */
}
.team-box .team-box-caption .team-box-caption-content {
position: absolute;
bottom: 12px;
width: 100%;
text-align: left;
}
.team-box .team-box-caption .team-box-caption-content .name,
.team-box .team-box-caption .team-box-caption-content .position {
padding: 0 15px;
text-shadow: 0px 0px 5px #000;
}
.team-box .team-box-caption .team-box-caption-content .name {
text-transform: uppercase;
font-size: 12px;
font-weight: 700;
}
.team-box .team-box-caption .team-box-caption-content .position {
font-size: 12px;
text-transform: uppercase;
}
.team-box:hover .team-box-caption {
opacity: 1;
}
#media(min-width:768px) {
.team-box .team-box-caption .team-box-caption-content .name {
font-size: 15px;
}
.team-box .team-box-caption .team-box-caption-content .position {
font-size: 15px;
text-transform: uppercase;
}
}
.sameHeight{
overflow:hidden;
}
.team-box-last{
text-align: left;
overflow:auto;
padding:30px 30px;
}
.team-box:last-child{
background-color: #f3f3f3;
}
#team .team-box-last h3{
color: #345;
padding-left: 15px;
}
#team .team-box-last p{
font-size: 18px;
line-height: 23px;
padding-top: 15px;
margin-bottom: 30px;
}
#team .team-box-last ul{
padding-left: 15px;
}
#team .team-box-last ul li{
font-size: 18px;
font-weight: 500;
}
#team .team-box-last ul li{
list-style: none;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- T E A M S E C T I O N -->
<section id="team" class="no-padding">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 text-center">
<h1><span class="orange">[ </span>Meet Our Team<span class="orange"> ]</span></h1>
<p>A perfect blend of creativity and technical wizardry.</br>The best people formula for great websites!</p>
</div>
</div>
<div class="row no-gutter">
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4" id="getheight" >
<a class="team-box" rel="" href="https://free4kwallpapers.com/uploads/originals/2015/07/13/natur-hintergrundbilder-09-2012-269-2.jpg" title="">
<img src="https://free4kwallpapers.com/uploads/originals/2015/07/13/natur-hintergrundbilder-09-2012-269-2.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/2.jpg" title="">
<img src="https://free4kwallpapers.com/uploads/originals/2015/07/13/natur-hintergrundbilder-09-2012-269-2.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/3.jpg" title="">
<img src="https://free4kwallpapers.com/uploads/originals/2015/07/13/natur-hintergrundbilder-09-2012-269-2.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/4.jpg" title="">
<img src="https://free4kwallpapers.com/uploads/originals/2015/07/13/natur-hintergrundbilder-09-2012-269-2.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/5.jpg" title="">
<img src="https://free4kwallpapers.com/uploads/originals/2015/07/13/natur-hintergrundbilder-09-2012-269-2.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/6.jpg" title="">
<img src="https://free4kwallpapers.com/uploads/originals/2015/07/13/natur-hintergrundbilder-09-2012-269-2.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/7.jpg" title="">
<img src="https://free4kwallpapers.com/uploads/originals/2015/07/13/natur-hintergrundbilder-09-2012-269-2.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<a class="team-box" rel="" href="img/team/8.jpg" title="">
<img src="https://free4kwallpapers.com/uploads/originals/2015/07/13/natur-hintergrundbilder-09-2012-269-2.jpg" class="img-responsive" alt="">
<div class="team-box-caption">
<div class="team-box-caption-content">
<div class="name">
Full Name
</div>
<div class="position">
Position
</div>
</div>
</div>
</a>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4 sameHeight">
<div class="team-box">
<div class="team-box-last">
<div class="t">
<h3>Want to join our team?</h3>
<p>We’re always looking for talented designers, developers, project managers and anyone who’s driven and has a passion for the digital industries.
</p>
<ul>
<li>Check our jobs page</li>
<li>Send us your CV</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<br/>
<br/>
<br/>
<br/><br/>
<br/>
<br/>
<br/>
<br/>
I also included resize option to tell how you can handle automatic height size.
Please feel free to change my code and make that nice and compatible with your requirement.