How do i fix this positioning? - html

i'm trying to create personal portfolio website, but having problem with position or images itself. I've tried everything, nothing fixes it. For example: tried adding float left, display block. Not working. I gave up at the end. Please help guys.
/* About - Portfolio */
.about-portfolio {
float: left;
width: 100%;
color: rgb(199, 199, 199);
-webkit-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;}
.portfolio-header {
margin-top: 20px;}
.about-style .portfolio-text {
font-size: 40px;}
.about-portfolio:hover {
color: rgb(0, 0, 0);}
.works-gallery {
position: relative;}
.about-portfolio .grid-item {
padding: 0px;}
.works-gallery img {
width: 100%;}
.clearfix {
clear: both;
}
<div id="portfolio" class="about-portfolio">
<div class="portfolio-header">
<h2 class="portfolio-text">Our Works</h2>
<div class="divider"></div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="assets/img/portfolio/portfolio-1.jpg" alt="Image description" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="assets/img/portfolio/portfolio-2.jpg" alt="Image description" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="assets/img/portfolio/portfolio-3.jpg" alt="Image description" class="img-responsive">
</a>
</div>
</div>
<!-- CLEARFIX -->
<div class="clearfix"></div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="assets/img/portfolio/portfolio-4.jpg" alt="Image description" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="assets/img/portfolio/portfolio-5.jpg" alt="Image description" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="assets/img/portfolio/portfolio-6.jpg" alt="Image description" class="img-responsive">
</a>
</div>
</div>
</div>
That whitespace
after adding clearfix

What you are asking for is already provided by Bootstrap library out of the box. All you need to do is take care not to break the necessary markup. Here's a working example:
.img-responsive {
min-width: 100%;
}
<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>
<div class="container">
<div id="portfolio" class="about-portfolio">
<div class="portfolio-header">
<h2 class="portfolio-text">Our Works</h2>
<div class="divider"></div>
</div>
<div class="row">
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="http://placehold.it/350x150/E8117F/ffffff" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="http://placehold.it/350x150/999999/ffffff" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="http://placehold.it/350x150/ffffff/666666" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="http://placehold.it/350x150/E8117F/ffffff" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="http://placehold.it/350x150/999999/ffffff" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="http://placehold.it/350x150/ffffff/666666" class="img-responsive">
</a>
</div>
</div>
</div>
</div>
</div>
You might notice the only CSS rule I added is making small images fit their parent width. Also please notice there is only one row that contains all the col-*s. There is no need of any .clearfix.
If you want the images to be glued together, the simplest way would be to use this CSS:
.img-responsive {
min-width: calc(100% + 30px);
position: relative;
left: -15px;
}
.img-responsive {
min-width: calc(100% + 30px);
position: relative;
left: -15px;
}
<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>
<div class="container">
<div id="portfolio" class="about-portfolio">
<div class="portfolio-header">
<h2 class="portfolio-text">Our Works</h2>
<div class="divider"></div>
</div>
<div class="row">
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="http://placehold.it/350x150/E8117F/ffffff" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="http://placehold.it/350x150/787878/ffffff" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="http://placehold.it/350x150/ffffff/666666" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="http://placehold.it/350x150/E8117F/ffffff" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="http://placehold.it/350x150/999999/ffffff" class="img-responsive">
</a>
</div>
</div>
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="http://placehold.it/350x150/cccccc/666666" class="img-responsive">
</a>
</div>
</div>
</div>
</div>
</div>

The problem you're running into is quite common in grid layouts. If each column isn't exactly the same height they won't clear correctly.
You need to clear the first element of each new row. The clearfix div you've added will break the 2 column version of the layout. It's also worth noting that Bootstrap includes a clearfix class so the styling you've added is overriding defaults.
Start by wrapping all your grid items in a div.
<div class="work-gallery-container clearfix">
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="assets/img/portfolio/portfolio-1.jpg" alt="Image description" class="img-responsive">
</a>
</div>
</div>
. . . ALL THE WAY TO THE LAST ITEM . . .
<div class="col-sm-6 col-md-4 grid-item">
<div class="works-gallery">
<a href="img/1.png">
<img src="assets/img/portfolio/portfolio-6.jpg" alt="Image description" class="img-responsive">
</a>
</div>
</div>
</div><!-- .work-gallery-container -->
Then apply some CSS.
#media only screen and (min-width: 768px) and (max-width: 991px) {
.work-gallery-container .grid-item:nth-child(2n+1) {
clear: both;
}
}
#media only screen and (min-width: 992px) {
.work-gallery-container .grid-item:nth-child(3n+1) {
clear: both;
}
}
This assumes that you're using standard Bootstrap 3 breakpoints.

Related

CSS height 100% not working in ipad browser

I have tried to set equal height columns for my feature collection. Its everything working good in desktop and mobile ipad screens . But when I check real device the height:100%not working. I have tried 'height:100vh` also.
<div class="feature-category default-padding bg-white">
<div class="full container">
<div class="cartHomeTitle text-center mb-4">
<h3>Featured Collection</h3>
</div>
<div class="row mycolspce">
<div class="col-md-6">
<div class="feature-imgitem d-flex align-self-stretch h-100">
<a class="banner_effect" href="#">
<img src="img/new-product1.jpg" class="img-fluid w-100" alt="fc-collection">
</a>
<div class="fc-meta">
<h4>Men</h4>
<p>New Collection</p>
</div>
</div>
</div>
<div class="col-md-6">
<div class="feature-imgitem">
<a class="banner_effect" href="#">
<img src="img/fc-collection2.jpg" class="img-fluid w-100" alt="fc-collection">
</a>
<div class="fc-meta left">
<h4>Shirts</h4>
<p>8 Item</p>
</div>
</div>
<div class="row mt-4">
<div class="col-md-6">
<div class="feature-imgitem">
<a class="banner_effect" href="#">
<img src="img/fc-collection3.jpg" class="img-fluid w-100" alt="fc-collection">
</a>
<div class="fc-meta left">
<h4>Bags</h4>
<p>8 Item</p>
</div>
</div>
</div>
<div class="col-md-6">
<div class="feature-imgitem">
<a class="banner_effect" href="#">
<img src="img/fc-collection4.jpg" class="img-fluid w-100" alt="fc-collection">
</a>
<div class="fc-meta">
<h4>SALE</h4>
<p>FASHION SHOES</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div> <!--//container-->
</div>
my webiste url Featured Collection
My ipad this what I am getting as per below image.
Sometimes height and min-height will not work on ipad and safari browsers. You can use display:flex follow flexbox group to align equal column height as below example.
.row.mycolspce div[class^="col-"] {
display: flex;
flex-wrap: wrap;
}
.feature-imgitem img {
object-fit:cover;
}
.feature-imgitem,.banner_effect {
display:flex;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<div class="container">
<div class="row mycolspce">
<div class="col-md-6">
<div class="feature-imgitem">
<a class="banner_effect" href="#">
<img src="http://orderonline.my/demo.mybizcart/img/new-product1.jpg" class="img-fluid w-100" alt="fc-collection">
</a>
</div>
</div>
<div class="col-md-6">
<div class="feature-imgitem">
<a class="banner_effect" href="#">
<img src="http://orderonline.my/demo.mybizcart/img/fc-collection2.jpg" class="img-fluid w-100" alt="fc-collection">
</a>
</div>
<div class="row mt-4">
<div class="col-md-6">
<div class="feature-imgitem">
<a class="banner_effect" href="#">
<img src="http://orderonline.my/demo.mybizcart/img/fc-collection3.jpg" class="img-fluid w-100" alt="fc-collection">
</a>
</div>
</div>
<div class="col-md-6">
<div class="feature-imgitem">
<a class="banner_effect" href="#">
<img src="http://orderonline.my/demo.mybizcart/img/fc-collection4.jpg" class="img-fluid w-100" alt="fc-collection">
</a>
</div>
</div>
</div>
</div>
</div>
</div>

Bootstrap 4 grids

How to make a layout on bootstrap4, and then I can not. Thank you in advance!
<div class="col-8">
<a href="#">
<div class="card">
<img class="card-img" src="img.jpg">
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<img class="card-img" src="img.jpg">
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<img class="card-img" src="img.jpg">
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<img class="card-img" src="img.jpg">
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<img class="card-img" src="img.jpg">
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<img class="card-img" src="img.jpg">
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<img class="card-img" src="img.jpg">
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<img class="card-img" src="img.jpg">
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<img class="card-img" src="img.jpg">
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<img class="card-img" src="img.jpg">
</div>
</a>
</div>
Now it goes like this
And need to look like this
Using float: left; styling on the columns will give you this effect.
Below I changed the <img> tag to a <div> with a border to give the same visuals since I don't have img.jpg. If you swap those back in it should still work.
I added the styling to the col classes by just adding:
.col-4, .col-8{
float:left;
}
Though, I would recommend adding a class to the outer div's with this styling instead of pigy-backing on bootstrap's classes.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>title</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css"
integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous">
</head>
<body>
<style>
.small-card {
height: 60px;
width: 100%;
border: solid 2px #333;
}
.large-card{
height: 120px;
width: 100%;
border: solid 2px #333;
}
.col-4, .col-8{
float:left;
}
</style>
<div class="col-8">
<a href="#">
<div class="card">
<div class="large-card"></div>
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<div class="small-card"></div>
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<div class="small-card"></div>
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<div class="small-card"></div>
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<div class="small-card"></div>
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<div class="small-card"></div>
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<div class="small-card"></div>
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<div class="small-card"></div>
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<div class="small-card"></div>
</div>
</a>
</div>
<div class="col-4">
<a href="#">
<div class="card">
<div class="small-card"></div>
</div>
</a>
</div>
</body>
</html>

how to make this div/image using bootstrap grid system

I need to made this div in bootstrap 3 as shows in image...
I need to display 4 icons/images in one row and another 4 icons in another row in smaller screen/mobile view..i dont know any error in my code..
please help me to make this as shown as in image.
<section class="container-fluid">
<div class="row" style="background-color:#034ea2;">
<div class="col-md-2"></div>
<div class="col-md-1 text-center ">
<div class="im1">
<img src="/images/speaker.png" alt="1" class="siz">
</div>
<div class="textt">
<h6>Sound insultion</h6>
</div>
</div>
<div class="col-md-1 text-center" >
<div class="im1">
<img src="/images/renewable-energy.png" alt="1" class="siz">
</div>
<div class="textt">
<h6>Save energy</h6>
</div>
</div>
<div class="col-md-1 text-center">
<div class="im1">
<img src="/images/window.png" alt="1" class="siz">
</div>
<div class="textt">
<h6>Prevent Dust Buildup</h6>
</div>
</div>
<div class="col-md-1 text-center">
<div class="im1">
<img src="/images/stormy.png" alt="1" class="siz">
</div>
<div class="textt">
<h6>Storm Resistant</h6>
</div>
</div>
<div class="col-md-1 text-center">
<div class="im1">
<img src="/images/hotel-elevator.png" alt="1" class="siz">
</div>
<div class="textt">
<h6>Elegant Looks</h6>
</div>
</div>
<div class="col-md-1 text-center">
<div class="im1">
<img src="/images/umb.png" alt="1" class="siz">
</div>
<div class="textt">
<h6>Blocks Seepage</h6>
</div>
</div>
<div class="col-md-1 text-center">
<div class="im1">
<img src="/images/sun.png" alt="1" class="siz">
</div>
<div class="textt">
<h6>Thermal Insulation</h6>
</div>
</div>
<div class="col-md-1 text-center">
<div class="im1">
<img src="/images/maintenance.png" alt="1" class="siz">
</div>
<div class="textt">
<h6>Low maintenance</h6>
</div>
</div>
<div class="col-md-2">
</div>
</div>
</section>
styles
.im1{
padding-top: 8px;
padding-left: 8px;
}
.siz{
width: 40px;
}
.textt{
font-size: 15px;
color:#ffffff;
font-family: 'Times New Roman', Times, serif !important;
}
Here is the image
how to make this image using bootstrap grid system...
I created a code for you. I hope it will help to you.
https://codepen.io/myco27/pen/OvMdGp
img{
width: 100%;
}
.img1{
width: calc(100% / 8);
float:left;
}
#media (max-width: 860px) {
.img1{
width: calc(100% / 4);
float:left;
}
}
<section class="container-fluid">
<div class="row" style="background-color:#034ea2;">
<div class="img1 text-center">
<img src="https://webfoundation.org/docs/2017/03/March-12-Letter.jpg" alt="1">
</div>
<div class="img1 text-center">
<img src="https://webfoundation.org/docs/2017/03/March-12-Letter.jpg" alt="1">
</div>
<div class="img1 text-center">
<img src="https://webfoundation.org/docs/2017/03/March-12-Letter.jpg" alt="1">
</div>
<div class="img1 text-center">
<img src="https://webfoundation.org/docs/2017/03/March-12-Letter.jpg" alt="1">
</div>
<div class="img1 text-center">
<img src="https://webfoundation.org/docs/2017/03/March-12-Letter.jpg" alt="1">
</div>
<div class="img1 text-center">
<img src="https://webfoundation.org/docs/2017/03/March-12-Letter.jpg" alt="1">
</div>
<div class="img1 text-center">
<img src="https://webfoundation.org/docs/2017/03/March-12-Letter.jpg" alt="1">
</div>
<div class="img1 text-center">
<img src="https://webfoundation.org/docs/2017/03/March-12-Letter.jpg" alt="1">
</div>
</div>
</section>
First bootstrap runs in a 12 grid sysytem that is defined or can be broken down into 2,3, or 4 segements...basically any divisor of 12. In your case, to get the first four images in a row (in a small device), we split the grid by 3 i.e "col-md-3" for each image wrapper and "col-lg-1" (for large devices) e.g using a snippet from your code
<div class="col-lg-1 col-md-3 text-center">
<div class="im1">
<img src="/images/hotel-elevator.png" alt="1" class="siz">
</div>
<div class="textt">
<h6>Elegant Looks</h6>
</div>
</div>
Then avoid splitting the grid at the main <div class="col-md-2"></div> wrapper, simply leave it as <div class="row justify-content-md-center"></div>.
This should work just fine.
NB: The number of images willbe only 8 in this container
For Your CSS is simply modify the following
.siz{
width: 100%;
}
Try This. it has 8 div in 1 row. as shown in image
<style>
.main{
background:#034da2;
}
</style>
<div class="col-md-12 main">
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-3">
<img src="image" alt="your image"/>
</div>
<div class="col-md-3">
<img src="image" alt="your image"/>
</div>
<div class="col-md-3">
<img src="image" alt="your image"/>
</div>
<div class="col-md-3">
<img src="image" alt="your image"/>
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-3">
<img src="image" alt="your image"/>
</div>
<div class="col-md-3">
<img src="image" alt="your image"/>
</div>
<div class="col-md-3">
<img src="image" alt="your image"/>
</div>
<div class="col-md-3">
<img src="image" alt="your image"/>
</div>
</div>
</div>
</div>
</div>
</div>

Bootstrap default padding and margin causing images to stretch outside the container

My images are stretching into the padding/margin that bootstrap uses to divide the columns. I want to keep the columns divided but not have the images stretch. I have been able to shrink the image using padding but then the whitespace between the columns is clickable which is not what I want.
<div id="cont_divider" class="container">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-3 col_divide">
<div class="row text_center">
<a href="#" class="image_link_styling">
<div class="col-md-12">
<div id="inner_cont_1">
<div class="row">
<p class="stair_image_font_style">Straight<br/>Staircase</p>
<img class="img-responsive staircase_imgs" src="<?php bloginfo('template_directory'); ?>/images/straight.jpg" alt="straight staircase">
</div>
</div>
</div>
</a>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3 col_divide">
<div class="row text_center">
<a href="#" class="image_link_styling">
<div class="col-md-12">
<div id="inner_cont_2">
<div class="row">
<p class="stair_image_font_style">Single Winder<br/>Staircase</p>
<img class="img-responsive staircase_imgs" src="<?php bloginfo('template_directory'); ?>/images/single_winder.jpg" alt="straight staircase">
</div>
</div>
</div>
</a>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3 col_divide">
<div class="row text_center">
<a href="#" class="image_link_styling">
<div class="col-md-12">
<div id="inner_cont_3">
<div class="row">
<p class="stair_image_font_style">Double Winder<br/>Staircase</p>
<img class="img-responsive staircase_imgs" src="<?php bloginfo('template_directory'); ?>/images/double_winder.jpg" alt="straight staircase">
</div>
</div>
</div>
</a>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3 col_divide">
<div class="row text_center">
<a href="#" class="image_link_styling">
<div class="col-md-12">
<div id="inner_cont_4">
<div class="row">
<p class="stair_image_font_style">Triple Winder<br/>Staircase</p>
<img class="img-responsive staircase_imgs" src="<?php bloginfo('template_directory'); ?>/images/triple_winder.jpg" alt="straight staircase">
</div>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
CSS:
#inner_cont_1{
background-color: #336699;
}
#inner_cont_2{
background-color: #cc6633;
}
#inner_cont_3{
background-color: #ff6633;
}
#inner_cont_4{
background-color: #ffcc66;
}
.staircase_imgs{
box-sizing: border-box;
width: 100%;
display: block;
padding: 0 1.238em 0.3em 1.238em;
}
.stair_image_font_style{
font-size: 2em;
color: #ffffff;
line-height: 1em;
padding: 0.8em 0.938em;
margin: 0;
}
.col_divide{
margin-top: 1em;
margin-bottom: 1em;
}
That's because you're using .row without a .col- class. .row has negative left and right margins which will extend the content area out beyond the parent. The padding of a .col- class nullifies this affect. Remove .row.
#import url( 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css' );
#inner_cont_1 {
background-color: #336699;
}
#inner_cont_2 {
background-color: #cc6633;
}
#inner_cont_3 {
background-color: #ff6633;
}
#inner_cont_4 {
background-color: #ffcc66;
}
.stair_image_font_style {
font-size: 2em;
color: #ffffff;
line-height: 1em;
padding: 0.8em 0.938em;
margin: 0;
}
.col_divide {
margin-top: 1em;
margin-bottom: 1em;
}
<div id="cont_divider" class="container">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-3 col_divide">
<div class="row text_center">
<div class="col-md-12">
<a href="#" class="image_link_styling">
<div id="inner_cont_1">
<p class="stair_image_font_style">Straight<br/>Staircase</p>
<img class="img-responsive" src="http://placehold.it/600x400/fc0" alt="straight staircase">
</div>
</a>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3 col_divide">
<div class="row text_center">
<div class="col-md-12">
<a href="#" class="image_link_styling">
<div id="inner_cont_2">
<p class="stair_image_font_style">Single Winder<br/>Staircase</p>
<img class="img-responsive" src="http://placehold.it/600x400/fc0" alt="straight staircase">
</div>
</a>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3 col_divide">
<div class="row text_center">
<div class="col-md-12">
<a href="#" class="image_link_styling">
<div id="inner_cont_3">
<p class="stair_image_font_style">Double Winder<br/>Staircase</p>
<img class="img-responsive" src="http://placehold.it/600x400/fc0" alt="straight staircase">
</div>
</a>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-3 col_divide">
<div class="row text_center">
<div class="col-md-12">
<a href="#" class="image_link_styling">
<div id="inner_cont_4">
<p class="stair_image_font_style">Triple Winder<br/>Staircase</p>
<img class="img-responsive" src="http://placehold.it/600x400/fc0" alt="straight staircase">
</div>
</a>
</div>
</div>
</div>
</div>
</div>
P.S. I also removed your .staircase_imgs class as it's not required once you remove the .row elements. I also rearranged some of your markup like a to inside the Bootstrap column element. This way the white space around the column element isn't clickable.
Remove the extra <div class="row"> you have. This creates margin: 0 -15px; for .col to rest in, but you do not have a -col in this .row ... so simply remove it.
Like this:
<div class="col-xs-12 col-sm-6 col-md-3 col_divide">
<div class="row text_center">
<a href="#" class="image_link_styling">
<div class="col-md-12">
<div id="inner_cont_3">
<div class="row"> <!-- REMOVE THIS DIV -->
<p class="stair_image_font_style">Double Winder<br/>Staircase</p>
<img class="img-responsive staircase_imgs" src="<?php bloginfo('template_directory'); ?>/images/double_winder.jpg" alt="straight staircase">
</div>
</div>
</div>
</a>
</div>
</div>
First of all, you should place your a tag inside bootstrap column, in order to be inside that padding column. Second, you added unnecessary .row classes.
Your structure should be something like this:
<div class="col-xs-12 col-sm-6 col-md-3 col_divide">
<div class="row text_center">
<div class="col-md-12">
<div id="inner_cont_1">
<a href="#" class="image_link_styling">
<p class="stair_image_font_style">Straight<br/>Staircase</p>
<img class="img-responsive staircase_imgs" src="<?php bloginfo('template_directory'); ?>/images/straight.jpg" alt="straight staircase">
</a>
</div>
</div>
</div>
</div>
I made a fiddle with your code: fiddle
Hope this helps!
your <a> tag starts way outside of the <img> tag. Instead of using the link over the multiple <div>'s try placing the <a> tag just around the <img> See the example below:
<div class="col-md-12">
<a href="..">
<img src="..." class="img-responsive">
</a>
</div>

4 Centered Images HTML/ CSS BOOTSTRAP

--FIRST IMAGE IS DESIRE OUTPUT---
I got it to work on my screen but when I put it on bigger monitor doesn't seem to scale right. Any Recommendations ?
<div style="margin-left: 100px;margin-right: 100px;">
<div class="container-fluid">
<div class="row">
<div class="col-sm-3">
<img src="img/NUESTROS EVENTOS -1.png">
</div>
<div class="col-sm-3">
<img s src="img/NUESTROS EVENTOS -2.png">
</div>
<div class="col-sm-3">
<img src="img/NUESTROS EVENTOS -3.png">
</div>
<div class="col-sm-3">
<img src="img/NUESTROS EVENTOS -5.png">
</div>
</div>
</div>
This is what I get with this other code, centers but can't get rid the spaces.
---THIS IS WHAT I GET---
<div class="row" style="margin-bottom: 70px;">
<!-- column -->
<div class="col-xs-6 col-sm-5cols wow bounceInLeft ">
<div class="thumbnail ">
<img src="img/NUESTROS EVENTOS -1.png">
</div>
</div>
<!-- column -->
<div class="col-xs-6 col-sm-5cols wow bounceInLeft ">
<div class="thumbnail">
<img src="img/NUESTROS EVENTOS -2.png">
</div>
</div>
<!-- column -->
<div class="col-xs-6 col-sm-5cols wow swing ">
<div class="thumbnail">
<img src="img/NUESTROS EVENTOS -3.png">
</div>
</div>
<!-- column -->
<!-- column -->
<div class="col-xs-6 col-sm-5cols wow bounceInRight ">
<div class="thumbnail">
<img src="img/NUESTROS EVENTOS -5.png">
</div>
</div>
</div>
You can use inline-block elements, I have created inline-block class to wrap img and gave text-center class to row to align images in center.
.row-custom .inline-block{
display:inline-block;
}
.row-custom .inline-block img{
max-width:100px
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row row-custom text-center">
<div class="inline-block">
<img src="https://placeholdit.imgix.net/~text?txtsize=28&txt=300%C3%97300&w=300&h=300">
</div>
<div class="inline-block">
<img s src="https://placeholdit.imgix.net/~text?txtsize=28&txt=300%C3%97300&w=300&h=300">
</div>
<div class="inline-block">
<img src="https://placeholdit.imgix.net/~text?txtsize=28&txt=300%C3%97300&w=300&h=300">
</div>
<div class="inline-block">
<img src="https://placeholdit.imgix.net/~text?txtsize=28&txt=300%C3%97300&w=300&h=300">
</div>
</div>
Don't need to change or add more into CSS, You can use the Bootstrap class:
<div class="row">
<div class="col-sm-3">
<img class="img-responsive center-block" src="img/NUESTROS EVENTOS -1.png">
</div>
<div class="col-sm-3">
<img class="img-responsive center-block" src="img/NUESTROS EVENTOS -2.png">
</div>
<div class="col-sm-3">
<img class="img-responsive center-block" src="img/NUESTROS EVENTOS -3.png">
</div>
<div class="col-sm-3">
<img class="img-responsive center-block" src="img/NUESTROS EVENTOS -5.png">
</div>
</div>
Do these 3 things to achieve the desire result-
1. Add .img-responsive class to your img tags as its a way to make images responsive in bootstrap framework. You can also check this link for reference .
2. Add width="100%" to images to take up full space available in the image.
3. Add nopadding class to columns so that it will remove the padding space.
Update your code as below:
.nopadding {
padding: 0 !important;
margin: 0 !important;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="row">
<div class="col-xs-3 nopadding">
<img src="https://dummyimage.com/600x400/000/fff" width="100%" class="img-responsive">
</div>
<div class="col-xs-3 nopadding">
<img s src="https://dummyimage.com/600x400/000/fff" class="img-responsive" width="100%">
</div>
<div class="col-xs-3 nopadding">
<img src="https://dummyimage.com/600x400/000/fff" class="img-responsive" width="100%">
</div>
<div class="col-xs-3 nopadding">
<img src="https://dummyimage.com/600x400/000/fff" class="img-responsive" width="100%">
</div>
</div>
</div>