Why am I getting random spaces between the image grid? - html

After reading some threads, I managed to use the 'flex' class to remove the random blank spaces. But I've tried everything and now I am tired of this. I cannot get rid of these random spaces. Can anyone please point out what's going wrong in this?
.jumbotron {
margin-top: 80px;
padding-left: 40px;
background: #0d2d60;
color: white;
}
.image {
width: 100%;
height: 250px;
background-size: cover;
background-position: center;
}
.image1 {
background-image: url("https://source.unsplash.com/MYlvxeye9J0");
}
.image2 {
background-image: url("https://source.unsplash.com/KxCq-xveKcU");
}
.image3 {
background-image: url("https://source.unsplash.com/CKQG961UaWo");
}
.image4 {
background-image: url("https://source.unsplash.com/yySQipYW6Y4");
}
.image5 {
background-image: url("https://source.unsplash.com/ZtTkB3LmlNw");
}
.image6 {
background-image: url("https://source.unsplash.com/NdBsn0WQadw");
}
.image7 {
background-image: url("https://source.unsplash.com/lIa03ti94ec");
}
.image8 {
background-image: url("https://source.unsplash.com/k5wF1D_1rjo");
}
.image9 {
background-image: url("https://source.unsplash.com/Jd8hr75moLc");
}
body {
background: #081935;
}
.navbar {
background: #0d2d60;
color: white;
border-bottom: 0;
}
.flex {
display: flex;
flex-wrap: wrap;
}
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button aria-expanded="false" class="navbar-toggle collapsed" data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" type="button"><span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span></button> <a class="navbar-brand" href="#"><span aria-hidden="true" class="glyphicon glyphicon-camera"></span> IMGS</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
About Us
</li>
<li>
Contact
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
Sign Up
</li>
<li>
Login
</li>
</ul>
</div>
</div>
</nav>
<div class="jumbotron container">
<h1><span class="glyphicon glyphicon-camera"></span> The Image Gallery</h1>
<p>A bunch of beautiful images that I didn't take</p>
</div>
<div class="container">
<div class="row flex">
<div class="col-lg-4 col-md-4 col-sm-6">
<div class="thumbnail">
<div class="image image1"></div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6">
<div class="thumbnail">
<div class="image image2"></div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6">
<div class="thumbnail">
<div class="image image3"></div>
</div>
</div>
</div>
<div class="row flex">
<div class="col-lg-4 col-md-4 col-sm-6">
<div class="thumbnail">
<div class="image image4"></div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6">
<div class="thumbnail">
<div class="image image5"></div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6">
<div class="thumbnail">
<div class="image image6"></div>
</div>
</div>
</div>
<div class="row flex">
<div class="col-lg-4 col-md-4 col-sm-6">
<div class="thumbnail">
<div class="image image7"></div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6">
<div class="thumbnail">
<div class="image image8"></div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6">
<div class="thumbnail">
<div class="image image9"></div>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">
</script>
<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>
Random Space between the Images
On screen size sm and x-sm
Works perfectly If the sceen size is large

I see a couple of problems:
1) Unrelated, loading jquery twice
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script>
[...]
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js">
2) There is a problem in the code for small size (sm):
There are 3 divs with col-sm-6 and the sum of them should be 12 but 3x6 = 18, that's why third image gets on its own line.
3) For resolutions less than 768px wide or so, the col-md-* gets applied, i think you need xs cols if you need specific for this case.
More info in the docs: Boostrap 3 - Grid

I placed your code in jsfiddle using a bootstrap boiler plate and I'm assuming that you're wanting to remove the padding between the images?
By default Boostrap's .col- classes have padding-left and padding-right styles.
If you add this to your CSS it will remove the padding:
.col-lg-4, .col-md-4, .col-sm-6 {
padding: 0px;
}
However, this will change column padding sitewide. It is not recommended that you set global styles for columns. My recommendation would be to create a CSS class like "img-no-padding" and add that class to those columns.
Here is a jsfiddle demonstrating this.

Ok guys, I found an exact solution for this problem after some more research. #emsimpson It was not about the padding or margin. The problem was with the bootsrap 12 container grid.
As mentioned by #August : There is a problem in the code for small size (sm): There are 3 divs with col-sm-6 and the sum of them should be 12 but 3x6 = 18, that's why third image gets on its own line.
But I found a solution for that too. Flex deals with this problem.
.flex
{
display: flex;
flex-wrap: wrap;
}
As you can see, I have used the flex class but it didn't work. So I nested all of my columns under one single row with class flex and it tackled the problem. Bootstrap will know when to move the columns to the next row based on accumulated size.
<div class="container">
<div class="row flex">
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="thumbnail">
<div class="image image1"></div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="thumbnail">
<div class="image image2"></div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="thumbnail">
<div class="image image3"></div>
</div>
</div>
<!-- </div> -->
<!-- <div class="row flex"> -->
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="thumbnail">
<div class="image image4"></div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="thumbnail">
<div class="image image5"></div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="thumbnail">
<div class="image image6"></div>
</div>
</div>
<!-- </div> -->
<!-- <div class="row flex"> -->
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="thumbnail">
<div class="image image7"></div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="thumbnail">
<div class="image image8"></div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="thumbnail">
<div class="image image9"></div>
</div>
</div>
<!-- </div> -->
</div>
</div>

Related

My images are not being displayed in a row

In a section of my code I made a row-grid for a part that displays images but when I went to insert and look at the website its not displaying in a row format but in a column and im not sure why. I thought the problem came from it being col-sm-6 but i changed it to col-sm-12 and its still not displaying it. Any reasons why?
.site-main .project-area {
padding: 4rem 0;
}
.site-main .project-area .button-group button {
background: transparent;
border: none;
font: normal 500 16px/130px var(--lato);
text-transform: uppercase;
}
.site-main .project-area .button-group button+button {
padding-left: 3rem;
}
.site-main .project-area .grid .our-project>title h4 {
font: normal 700 25px/12px var(--lato);
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<section class="project-area">
<div class="container">
<div class="project title pb-5">
<h1 class="h1 text-uppercase title-h1"> Recent Projects</h1>
<h1 class="h1 text-uppercase title h1"> Quality Work</h1>
</div>
<div class="div button-group">
<button type="button" class="active">All</button>
<button type="button" data-filter=".cars">Cars</button>
<button type="button" data-filter=".character">Characters</button>
<button type="button">Food</button>
<button type="button">Activities</button>
</div>
<div class="row-grid">
<div class="col-lg-4 col-md-6 col-sm-6 element-item cars">
<div class="our-project">
<div class="img">
<img src="./img/portfolio/car.jpg" alt="car">
</div>
<div class="title py-4">
<h4 class="text-uppercase">minimul design</h4>
<span class="text-secondary">Latest, Popular</span>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-sm-12 element-item character">
<div class="our-project">
<div class="img">
<img src="./img/portfolio/images.jpg" alt="car">
</div>
<div class="title py-4">
<h4 class="text-uppercase">video game character</h4>
<span class="text-secondary">popular, Portfolio</span>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-sm-12 element-item popular">
<div class="our-project">
<div class="img">
<img src="./img/portfolio/ntfs-to-be-professional-gamer-image1.jpg" alt="car">
</div>
<div class="title py-4">
<h4 class="text-uppercase">minimul design</h4>
<span class="text-secondary">Latest, Popular</span>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-sm-12 element-item popular">
<div class="our-project">
<div class="img">
<img src="./img/portfolio/ntfs-to-be-professional-gamer-image1.jpg" alt="car">
</div>
<div class="title py-4">
<h4 class="text-uppercase">minimul design</h4>
<span class="text-secondary">Latest, Popular</span>
</div>
</div>
</div>
</div>
</div>
</section>
Changing the class row-grid to row makes it work. I don't think Bootstrap has a class called row-grid.
If you are trying to fit all the div elements into one row, just replace the col-lg-4 col-md-6 col-sm-6 and the col-lg-4 col-md-6 col-sm-12 with col

My image is flowing out from my div column. How I can fix it and made the image full-size into div

I have one container with full width (container-fluid) and card-desk inside it I have one vertical column and 2 rows, one with 3 columns and another one with 2 columns. The problem is that my image moved out ( flows out) from my div col, I used overflow-hidden, but it doesn't help. I used Cards, but also nothing at all. In CSS I add img{ width:100%; height:auto} no result again.It must be responsive so I can't use custom height and width.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<div class="container-fluid overflow-hidden">
<div class="card-deck">
<div class="row">
<div class="col-xl-3 col-md-3 col-12">
<img src="https://www.artgalleryofhamilton.com/wp-
content/uploads/2018/04/abstract-painting.jpg"class="card-img img-
fluid"/>
</div>
<div class="col-xl-9 col-md-9 col-12">
<div class="row">
<div class="col-xl-4 col-md-4 col-12">
<img src="https://www.adorama.com/alc/wp-
content/uploads/2017/09/shutterstock_664474234-825x465.jpg"class="card-
img img-fluid"/>
</div>
<div class="col-xl-4 col-md-4 col-12">
<img src="https://www.adorama.com/alc/wp-
content/uploads/2017/09/shutterstock_664474234-825x465.jpg"class="card-
img img-fluid"/>
</div>
<div class="col-xl-4 col-md-4 col-12">
<img src="https://www.adorama.com/alc/wp-
content/uploads/2017/09/shutterstock_664474234-825x465.jpg"class="card-
img img-fluid"/>
</div>
</div>
<div class="row">
<div class="col-xl-4 col-md-4 col-12">
<img src="https://www.adorama.com/alc/wp-
content/uploads/2017/09/shutterstock_664474234-825x465.jpg"class="card-
img img-fluid"/>
</div>
<div class="col-xl-8 col-md-8 col-12">
<img src="https://images.unsplash.com/photo-1524721696987-b9527df9e512?
ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&w=1000&q=80"class="card-img img-
fluid"/>
</div>
</div>
</div>
</div>
</div>
</div>
What I did:
What I want:
You can do this by setting the images as background-image
.img-6 {
background: url(https://www.artgalleryofhamilton.com/wp-content/uploads/2018/04/abstract-painting.jpg) no-repeat;
background-size: cover;
height: 300px
}
.img-1 {
background: url(https://www.adorama.com/alc/wp-content/uploads/2017/09/shutterstock_664474234-825x465.jpg) no-repeat;
background-size: cover;
height: 150px
}
.img-2 {
background: url(https://images.unsplash.com/photo-1524721696987-b9527df9e512?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&w=1000&q=80) no-repeat;
background-size: cover;
height: 150px
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<div class="container-fluid">
<div class="row">
<div class="col-sm-4 img-6 ">
</div>
<div class="col-sm-8 ">
<div class="row">
<div class="col-sm-4 img-1">
</div>
<div class="col-sm-4 img-1">
</div>
<div class="col-sm-4 img-1">
</div>
<div class="col-sm-4 img-1">
</div>
<div class="col-sm-8 img-2">
</div>
</div>
</div>
</div>
</div>

Bootstrap grid overflow with images

I´m trying to acchive this image gallery using bootstrap grid layout:
but I can´t overflow the last image on the second row into the first row...
Here is my html code:
.gal-container {
display: block;
width: 100%;
padding: 16px;
}
.nopadding {
padding: 0 !important;
margin: 0 !important;
}
.box {
padding: 32px;
}
.row img {
max-width: 100%;
max-height: 100%;
}
<section>
<div class="gal-container">
<div class="box">
<div class="row">
<div class="col-sm-6 nopadding"><img src="img/image1.jpg"></div>
<div class="col-sm-3 nopadding"><img src="img/image2.jpg"></div>
<div class="col-sm-3 nopadding"><img src="img/image3.jpg"></div>
</div>
<div class="row">
<div class="col-sm-3 nopadding"><img src="img/image4.jpg"></div>
<div class="col-sm-3 nopadding"><img src="img/image5.jpg"></div>
<div class="col-sm-6 nopadding"><img src="img/image6.jpg"></div>
</div>
</div>
</div>
</section>
The result of this code is this:
I would appreciate the help to put the Stranger Things image at the bottom of the two small pictures :)
There's absolutely no custom css needed for this and the job can be done with less code using native Bootstrap 4 classes alone:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
<section class="container">
<div class="row no-gutters">
<div class="col-sm-6">
<div class="row no-gutters">
<div class="col-12"><img src="img/image1.jpg"></div>
<div class="col-sm-6"><img src="img/image2.jpg"></div>
<div class="col-sm-6"><img src="img/image3.jpg"></div>
</div>
</div>
<div class="col-sm-6">
<div class="row no-gutters">
<div class="col-sm-6"><img src="img/image4.jpg"></div>
<div class="col-sm-6"><img src="img/image5.jpg"></div>
<div class="col"><img src="img/image6.jpg"></div>
</div>
</div>
</div>
</section>
Your markup is not matching as per your desired layout.It should be something like this :
<div class="box">
<div class="row">
<div class="col-sm-6 nopadding">
<div class="col-sm-12 nopadding">
<img src="img/image1.jpg">
</div>
<div class="row">
<div class="col-sm-6 nopadding">
<img src="img/image2.jpg">
</div>
<div class="col-sm-6 nopadding">
<img src="img/image3.jpg">
</div>
</div>
</div>
<div class="col-sm-6 nopadding">
<div class="col-sm-12 nopadding">
<img src="img/image4.jpg">
</div>
<div class="row">
<div class="col-sm-6 nopadding">
<img src="img/image5.jpg">
</div>
<div class="col-sm-6 nopadding">
<img src="img/image6.jpg">
</div>
</div>
</div>
</div>
</div>
Also add overflow:hidden in nopadding.
Hope it helps !
If you just swap around positioning and the wrappers, you should be able to get your desired effect
Also, you will have to take into account the paddings and widths you need as they will affect the positioning of the elements.
Demo works in full screen due to size
.gal-container {
display: block;
width: 600px;
padding: 16px;
}
.nopadding {
padding: 0 !important;
margin: 0 !important;
}
.box {
padding: 30px;
}
.row img {
max-width: 100%;
max-height: 100%;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="gal-container">
<div class="row">
<div class="col-sm-6 nopadding">
<div class="col-sm-12 nopadding"> <img src="http://via.placeholder.com/300x150"> </div>
<div class="col-sm-6 nopadding"> <img src="http://via.placeholder.com/150x100"> </div>
<div class="col-sm-6 nopadding"> <img src="http://via.placeholder.com/150x100"> </div>
</div>
<div class="col-sm-6 nopadding">
<div class="col-sm-6 nopadding"> <img src="http://via.placeholder.com/150x100"> </div>
<div class="col-sm-6 nopadding"> <img src="http://via.placeholder.com/150x100"> </div>
<div class="col-sm-12 nopadding"> <img src="http://via.placeholder.com/300x150"></div>
</div>
</div>
</div>

Text vertical centered in sticky BootStrap footer

i have big problem with vertical center in BS footer. My code below :
<footer class="footer navbar-fixed-bottom" style="background-color:lightgrey;">
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
<ul class="nav nav-pills nav-justified">
<li>SITE1</li>
<li>SITE2</li>
</ul>
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-center">
<div class="center-inner">
<p class="text-muted inner">Some text.</p>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-center">
<p>More text.</p>
</div>
</div>
</div>
</div>
JSFiddle
Unfortunatelly, text in 2nd and 3th column isn't vertically centered. I tried solutions from similar topics, but sadly - without good effects in sticky footer (in most cases - it changed footer height and layout - after added display:table).
Below i uploaded graphic illustrating how it looks today, and how I would like it to look :
Home somebody can help me with this.
You can use this:
.center-vertical{
display: flex;
align-items: center;
}
(just apply to parent boxes)
https://jsfiddle.net/kaskull/z4wLpk9h/5/
Try this
You can set the media-query value to set the break-point.
Check working updated demo
HTML:
<footer class="footer navbar-fixed-bottom" style="background-color:lightgrey;">
<div class="container">
<div class="row row-eq-height">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
<ul class="nav nav-pills nav-justified">
<li>SITE1</li>
<li>SITE2</li>
</ul>
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-center">
<div class="center-inner">
<p class="text-muted inner">Some text.</p>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-center">
<p>More text.</p>
</div>
</div>
</div>
</footer>
CSS:
#media screen and (max-width: 767px) {
.row-eq-height {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
align-items: center;
}
}
}
footer [class*="col-"] p {
padding: 10px 15px;
margin-bottom: 0;
}
Please check this.
footer .text-muted.inner, footer p{padding:10px 15px;margin:0;}
<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/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<footer class="footer navbar-fixed-bottom" style="background-color:lightgrey;">
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
<ul class="nav nav-pills nav-justified">
<li>SITE1</li>
<li>SITE2</li>
</ul>
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-center">
<div class="center-inner">
<p class="text-muted inner">Some text.</p>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-center">
<p>More text.</p>
</div>
</div>
</div>
</div>
</footer>
Hope this will help you.
Thanks.
It's because your links has a padding around it, so that you should also adding padding in p tag.
.footer [class*="col-"] p {
padding: 10px 15px;
margin: 0;
}
Working Demo

Does bootstrap let me to modify his own classes to make a page responsive

I'm creating project based in html and css. I have created this code in bootstrap inside a container and I want this to be responsive.
<div class=" container">
<div class="row">
<div class="col-md-12 col-sm-12 client "> <b>SEI GIÀ CLIENTE? ACCEDI </b>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-3"></div>
<div class="col-md-3 col-sm-3 labelField">
<div class="row">
<div class="col-md-4 col-sm-4 labelField">
<strong><br>EMAIL</strong>
</div>
<div class="col-md-8 col-sm-8">
<input class="ut" type="mail">
</div>
</div>
</div>
<div class="col-md-6 col-sm-6"></div>
</div>
<div class="row">
<div class="col-md-3 col-sm-3"></div>
<div class="col-md-3 col-sm-3 labelField">
<div class="row">
<div class="col-md-4 col-sm-4 labelField">
<strong><br>PASSWORD</strong>
</div>
<div class="col-md-8 col-sm-8">
<input class="ut" type="mail">
</div>
</div>
</div>
<div class="col-md-6 col-sm-6"></div>
</div>
<div class="row">
<div class="col-md-3 col-sm-3 col-xs-3 "></div>
<div class="col-md-6 col-sm-6 col-xs-6 pass"> Hai dimenticato la password?
</div>
<div class="col-md-3 col-sm-3 col-xs-3"></div>
</div>
<div class="row">
<div class="col-md-12 col-sm-12 ">
<a href="#">
<img src="images/entra.png" class="img-responsive registrati ">
</a>
</div>
</div>
<div class="row">
<div class="col-md-12 col-sm-12 ">
<a href="#">
<img src="images/fb.png" class="img-responsive registrati ">
</a>
</div>
</div>
<div class="row">
<div class="col-md-12 col-sm-12 ">
<div class="divider"></div>
</div
Here is my css:
.registrati {
margin-top: 20px;
margin-left: 338px;
margin-bottom: 8px;
width: 33%px;
}
.pass {
font-style: Arial black;
color: black;
font-size: 0.8em;
margin-left: 339px;
margin-bottom: 20px;
margin-top: 20px;
text-decoration: underline;
}
Here is what my result should look like:
The result is not responsive. My question is have I done something wrong or bootstrap doesnt let me to modify the classes as I did? So what should I do to make this responsive?
All the scripts and links required for responsivity are in my page but not here for a shorter demo. Thanks!
I can't run your snippet on my Mac but just by looking at your code, I would remove width: 80%; height: 100%; If you really want it to be responsive the "bootstrap way", try letting it handle your div containers in terms of sizes first. Have you tried that?
Looks fine in terms of responsiveness without your stylesheet: https://jsfiddle.net/DTcHh/23755/
EDIT: those margins seem pretty large? Maybe it just looks like it's not responsive because of the huge margins. Can you maybe provide a sketch of what it should look like?
EDIT2: Here is my answer: https://jsfiddle.net/DTcHh/23757/ I cleaned it up a bit. Your problem was that you had way too many divs and columns; you should check out Bootstrap's grid documentation again and use col-md-offset if you want to offset things by design.
First of all I am assuming that you have included bootstrap css and js properly. Going further you don't need additional css for making your page responsive. Bootstrap does that. Always remember bootstrap has 12 columns in a row. So u need to use it properly for your page to show responsiveness.
<div class="container contain">
<div class="row">
<div class="col-lg-3 col-md-4 col-sm-2 col-xs-12 text-center">
<a href="#">
<img src="https://www.google.co.in/logos/doodles/2016/2016-doodle-fruit-games-day-12-5125886484414464.3-scta.png" class="registrati img-responsive">
</a>
</div>
<div class="col-lg-6 col-md-4 col-sm-8 col-xs-12 pass text-center">
<a href="https://www.google.co.in/logos/doodles/2016/2016-doodle-fruit-games-day-12-5125886484414464.3-scta.png">
Hai dimenticato la password?
</a>
</div>
<div class="col-lg-3 col-md-4 col-sm-2 col-xs-12 text-center">
<a href="#">
<img src="https://www.google.co.in/logos/doodles/2016/2016-doodle-fruit-games-day-12-5125886484414464.3-scta.png" class="registrati img-responsive">
</a>
</div>
</div>
</div>