I have 3 boxes within a fluid container.
Each box has a heading title, an icon and some text below.
On :hover I want the icon to move to the top of the <div> and change it's size, I have managed to "achieve" it but using certain number of pixels.
That will not work in mobile resolutions if the title text is longer and takes 2 lines.
Here is what I have done so far:
Fiddle here
HTML
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 text-center market-blocks orange wow rollIn">
<div class="service-box">
<h2>Title</h2>
<i class="fa fa-5x fa-paper-plane wow bounceIn market-icon" data-wow-delay=".1s"></i>
<p class="">Certain text below the icon</p>
</div>
</div>
</div>
CSS
.container{
text-align:center;
}
.market-blocks{
background: #3aa0d1;
padding: 30px 0 30px 0;
cursor:pointer;
}
.orange{
background: #e97d68;
}
i.market-icon {
-webkit-transition: 1s ease-in;
-moz-transition: 1s ease-in;
-o-transition: 1s ease-in;
transition: 1s ease-in
}
.market-blocks:hover i.market-icon {
-webkit-transform: translate(0,-70px);
-moz-transform: translate(0,-70px);
-o-transform: translate(0,-70px);
-ms-transform: translate(0,-70px);
transform: translate(0,-70px);
font-size: 1.8em;
}
How can I do it? And also is there a better way to do the movement from the initial position to the top of the <div>?
Pure HTML/CSS solution:
.container {
text-align: center;
}
.market-blocks {
background: #3aa0d1;
padding: 30px 0;
cursor: pointer;
}
.orange {
background: #e97d68;
}
.service-box {
display: inline-block;
}
.service-box-header {
position: relative;
}
.market-title {
padding-bottom: 5em;
-webkit-transition: 1s ease-in;
transition: 1s ease-in
}
.market-icon {
position: absolute;
right: 0;
bottom: 0;
left: 0;
-webkit-transition: 1s ease-in;
transition: 1s ease-in
}
.market-blocks:hover .market-title {
padding-bottom: 0;
}
.market-blocks:hover .market-icon {
bottom: 100%;
font-size: 1.8em;
}
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 text-center market-blocks orange wow rollIn">
<div class="service-box">
<div class="service-box-header">
<h2 class="market-title">Very-very-very-very-very-very-very-very loooooooooooooooooooong title</h2>
<i class="fa fa-5x fa-paper-plane wow bounceIn market-icon"></i>
</div>
<p class="">Certain text below the icon</p>
</div>
</div>
</div>
</div>
Related
I have an image in HTML (aaa.jpg) and when I hover I need it to switch to another image (t1.jpg) indicated in css
.single-member .thumb .overlay-member #1 {
background: url(../img/t1.jpg) no-repeat center center/cover;
text-align: center;
padding: 30px;
opacity: 0;
-webkit-transition: all 0.3s ease 0s;
-moz-transition: all 0.3s ease 0s;
-o-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
}
<div class="row">
<div class="col-lg-3 col-sm-6">
<div class="single-member">
<div id="1">
<div class="thumb relative" style="background: url(img/aaa.jpg);">
<div class="overlay overlay-member d-flex flex-column justify-content-end align-items-center">
<div class="line"></div>
<div class="social d-flex align-items-center justify-content-center">
<i class="fa fa-linkedin"></i>
</div>
</div>
</div>
</div>
<div class="desc text-center">
<h5 class="text-uppercase">XXX</h5>
<p>ZZZ</p>
</div>
</div>
</div>
The above code works fine, but it works for using the same image for all. I need to use different images for people, so I repeated the code in html and css but changing the id. Then it is showing only the image stated in HTML file, flipping to the css ones.
.card {
width: 130px;
height: 195px;
position: relative;
display: inline-block;
margin: 50px;
}
.card .img-top {
display: none;
position: absolute;
top: 0;
left: 0;
z-index: 99;
}
.card:hover .img-top {
display: inline;
}
<div class="card">
<img src="https://www.tutorialrepublic.com/examples/images/card-front.jpg" alt="Card Back">
<img src="https://www.tutorialrepublic.com/examples/images/card-back.jpg" class="img-top" alt="Card Front">
</div>
First of all you needs to make some changes in your HTML
You can't use number ID as a css selector like #1 have to replaced with #one
REF: #1 should not use
and you can simply change image by css :hover selector.
Hope this will help you.
.single-member #one {
background: url(https://via.placeholder.com/728x90.png?text=normal) no-repeat center center/cover;
text-align: center;
padding: 30px;
opacity: 1;
-webkit-transition: all 0.3s ease 0s;
-moz-transition: all 0.3s ease 0s;
-o-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
}
.single-member #one:hover {
background: url(https://via.placeholder.com/728x90.png?text=hover) no-repeat center center/cover;
}
<div class="row">
<div class="col-lg-3 col-sm-6">
<div class="single-member">
<div id="one">
<div class="thumb relative">
<div class="overlay overlay-member d-flex flex-column justify-content-end align-items-center">
<div class="line"></div>
<div class="social d-flex align-items-center justify-content-center">
<i class="fa fa-linkedin"></i>
</div>
</div>
</div>
</div>
<div class="desc text-center">
<h5 class="text-uppercase">XXX</h5>
<p>ZZZ</p>
</div>
</div>
</div>
I suggest to use Jscript in HTML it will be of one line
<img src='FirstImage.png' onmouseover="this.src='ChangedImage.png';" onmouseout="this.src='FirstImage.png';" />
I'm trying to create a flipbox with basic HTML and SCSS.
It's working as intended on Windows machines on every browser but I can't get it to work properly on Mac machines. It's not browser specific because it won't work properly on any browser on a Mac. The animation with the text is flickering and also the text disappears after the animation is done. I tried using different webkit solutions after Googling for a while, but none seem to fix my issue. I really hope someone here could help me out since I have no clue anymore on what is causing this issue. I do know that it has to do with the way it's getting rendered.
<div class="container">
<div class="row">
<div class="col-12 col-md-6 col-lg-3 d-flex team-card">
<!-- card container -->
<div class="extraSpacing">
<!-- inner -->
<div class="content front">
<div class="name text-center mx-auto mt-auto">
<p>Name</p>
</div>
<div class="function text-center mx-auto mt-auto">
<p style="text-transform:uppercase;font-size:12px;">Function</p>
</div>
<div class="social text-center">
<i class="fa fa-instagram"></i>
<i class="fa fa-twitter"></i>
<i class="fa fa-facebook"></i>
<i class="fa fa-linkedin"></i>
</div> <!-- /social -->
</div> <!-- /content front -->
<div class="back">
<p>Back card content</p>
</div>
</div> <!-- /inner -->
</div> <!-- /card container -->
</div> <!-- /row -->
#teamWrapper {
margin: 75px 0;
.team-card:hover .extraSpacing {
transform: rotateY(180deg);
-webkit-transform: rotateY(180deg);
}
.team-card {
position: relative;
margin-bottom: 20px;
padding: 0 8px;
transition: all .6s linear;
-webkit-transition: all .6s linear;
perspective: 1000px;
-webkit-perspective: 1000px;
.extraSpacing {
box-sizing: border-box;
width: 100%;
height: 365px;
background-size: cover;
background-repeat: no-repeat;
margin: 0;
transition: transform 0.8s;
-webkit-transition: transform 0.8s;
transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
}
.social {
margin-top: 15px;
i {
color: white;
margin: 0 10px;
font-size: 20px;
transition: .2s all;
-webkit-transition: .2s all;
&:hover {
color: red;
-webkit-transition: .2s all;
transition: .2s all;
}
}
}
.front {
position: absolute;
bottom: 30px;
left: 0;
right: 0;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
.back {
position: absolute;
z-index: 10;
background: white;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
transform: rotateY(180deg);
height: 100%;
display: flex;
p {
color: black;
font-size: 11px;
}
}
p {
color: white;
font-family: Arial, Helvetica, sans-serif;
font-size: 18px;
font-weight: bold;
}
}
The URL is: https://ikycreative.ikydev.nl/over-ons/ and the problem is with the team cards at the bottom of the page. It should flip over with a white background and black text, which it does on Windows (Chrome, Firefox) but not on Mac (Safari, Chrome, Firefox). It flickers a lot on Mac.
Many many thanks in advance, any help would be greatly appreciated since I am clueless.
JSFiddle:
https://jsfiddle.net/zLcjy4em/1/
Is it correct to add a div in a link?
I have some icons on my website, which through bootstrap when I mouse over them, increase the size slightly. The icons are within two div. I want that when clicking on the icon, in addition to that they increase in size, they take me to another page my site. I show you one of the div:
<section class="ulockd-service-three">
<div class="container">
<div class="col-xs-6 col-sm-4 col-md-2">
<div class="ulockd-srvc-column-two one text-center">
<div class="ulockd-srvc-details-two">
<div class="ulockd-srv-icon-two"><span class="flaticon work">
</span>
</div>
<h5>Safety Work</h5>
</div>
</div>
</div>
</div>
</section>
I have tried several ways to put the link, and finally I found one that redirects me to the desired page, but I do not know if it is the most correct way to do it, I do not think it is appropriate, it does not seem aesthetic.
This is how the link works:
<section class="ulockd-service-three">
<div class="container">
<div class="col-xs-6 col-sm-4 col-md-2">
<div class="ulockd-srvc-column-two one text-center">
<div class="ulockd-srvc-details-two">
<a href="about.html"><div class="ulockd-srv-icon-two">
<span class="flaticon-work"> </span>
</div></a>
<h5>Safety Work</h5>
</div>
</div>
</div>
</div>
</section>
What I want to say is that if it is within the allowed, taking into account everything, including if Google liked it or not.
Can you tell me the correct way to add a link to the icon without breaking the magnifying effect?
Thank you
I EDIT THE QUESTION:
I add css so you can help me, I hope to add what is necessary.
I searched for what I thought might affect the span
I EDIT THE QUESTION:
I add css and code snippet
What I want is to know if the way I put the link is correct, correct adding a div inside a link tag , if the syntax is correct.
I show a fragment of the code,
I do not know how to correctly add the "FLATICON" CDN, so you can not see the icon, if you can correct that for me to make it work, I would appreciate it.
.ulockd-srvc-column-two:hover .ulockd-srv-icon-two span {
transform: scale(1.2);
-webkit-transform: scale(1.2);
-moz-transform: scale(1.2);
-o-transform: scale(1.2);
-ms-transform: scale(1.2);
}
.ulockd-fservice-box .db-overlayer span {
border: 3px solid #fff;
bottom: 10px;
color: #fff;
font-size: 48px;
line-height: 1.2em;
padding: 0 10px;
position: absolute;
right: 10px;
}
.ulockd-fservice-box.style2 span {
border: 1px solid #fff;
padding: 10px 15px;
position: absolute;
}
.time_circles{position:relative;width:100%;height:100%}.time_circles > div{position:absolute;text-align:center}.time_circles > div > h4{margin:0;padding:0;text-align:center;text-transform:uppercase;font-family:'Century Gothic',Arial}.time_circles > div > span{display:block;width:100%;text-align:center;font-family:'Century Gothic',Arial;font-size:300%;margin-top:.4em;font-weight:700}
.ulockd-srv-icon {
padding: 10px;
}
.ulockd-srvc-column .ulockd-srv-icon {
color: #fff;
display: inline;
font-size: 36px;
line-height: 1.2em;
margin-top: 9px;
padding: 8px 13px;
position: relative;
}
.ulockd-srv-icon {
padding: 10px;
}
.ulockd-srvc-column .ulockd-srv-icon {
color: #fff;
display: inline;
font-size: 36px;
line-height: 1.2em;
margin-top: 9px;
padding: 8px 13px;
position: relative;
}
.ulockd-srvc-column .srv-icon {
font-size: 60px;
line-height: 1.2em;
-webkit-transition: all 0.3s ease-in-out 0s;
-moz-transition: all 0.3s ease-in-out 0s;
-ms-transition: all 0.3s ease-in-out 0s;
-o-transition: all 0.3s ease-in-out 0s;
transition: all 0.3s ease-in-out 0s;
}
.ulockd-srvc-column:hover .srv-icon{
transform: scale(1.4);
-webkit-transform: scale(1.4);
-moz-transform: scale(1.4);
-o-transform: scale(1.4);
-ms-transform: scale(1.4);
}
.ulockd-ap-srv-icon {
background-color: #393939;
padding: 10px;
}
.ulockd-ap-srvc-column{
margin-bottom: 45px;
position: relative;
}
.ulockd-ap-srvc-column .ulockd-ap-srv-icon {
color: #fff;
float: left;
font-size: 36px;
margin-top: 9px;
position: relative;
}
.ulockd-ap-srv-icon::before {
background-color: #393939;
border-left: 4px solid #fff;
border-right: 10px solid #393939;
content: "";
height: 100%;
left: -33%;
position: absolute;
top: 0;
transform: skewX(9deg);
-webkit-transform: skewX(9deg);
-moz-transform: skewX(9deg);
-o-transform: skewX(9deg);
-ms-transform: skewX(9deg);
width: 44%;
}
.ulockd-srv-icon-two {
padding: 10px;
}
.ulockd-srvc-column-two {
padding: 10px;
position: inherit;
margin-top: -200px;
z-index: 999;
}
.ulockd-srvc-column-two.one {
margin-top: 0;
}
.ulockd-srvc-column-two:hover {
cursor: pointer;
}
.ulockd-srvc-column-two:hover .ulockd-srv-icon-two span {
transform: scale(1.2);
-webkit-transform: scale(1.2);
-moz-transform: scale(1.2);
-o-transform: scale(1.2);
-ms-transform: scale(1.2);
}
.ulockd-srvc-column-two .ulockd-srv-icon-two {
color: #fff;
font-size: 60px;
line-height: 1.3em;
position: relative;
-webkit-transition: all 0.2s ease-in-out 0s;
-moz-transition: all 0.2s ease-in-out 0s;
-ms-transition: all 0.2s ease-in-out 0s;
-o-transition: all 0.2s ease-in-out 0s;
transition: all 0.2s ease-in-out 0s;
}
.ulockd-srv-icon-two{
padding-bottom: 0;
}
.ulockd-srvc-details-two {
padding-top: 0;
}
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="shortcut icon" href="http://sstatic.net/so/favicon.ico">
</head>
<body>
<!--THIS IS THE NATURAL WAY OF THE DIV-->
<section class="ulockd-service-two parallax" data-stellar-background-ratio="0.3">
<div class="container">
<div class="row">
<div class="col-xxs-12 col-xs-6 col-sm-6 col-md-4">
<div class="ulockd-srvc-column three text-center ulockd-mrgn650">
<div class="srv-icon text-thm1"><span class="flaticon-farm-2"></span></div>
<div class="srvc-details">
<h3>Excellent Services</h3>
<p>Consectetur adipisicing elit. Fugiat perspiciatis necessitatibus beatae debitis repudiandae illo nihil commodi consequuntur ipsum iusto.</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!--AND THIS IS THE ONLY WAY I GOT TO ADD THE LINK WHEN WE CLICK THE ICON, SO THAT IT WORKS WITHOUT BREAKING THE STYLES OF THIS. And the one that I need to know if the syntax is correct-->
<section class="ulockd-service-two parallax" data-stellar-background-ratio="0.3">
<div class="container">
<div class="row">
<div class="col-xxs-12 col-xs-6 col-sm-6 col-md-4">
<div class="ulockd-srvc-column three text-center ulockd-mrgn650">
<!--this line is the one that I modify-->
<div class="srv-icon text-thm1"><span class="flaticon-farm-2"></span></div>
<div class="srvc-details">
<h3>Excellent Services</h3>
<p>Consectetur adipisicing elit. Fugiat perspiciatis necessitatibus beatae debitis repudiandae illo nihil commodi consequuntur ipsum iusto.</p>
</div>
</div>
</div>
</div>
</div>
</section>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</body>
</html>
You should remove the div operation span directly or maybe better
<section class="ulockd-service-three">
<div class="container">
<div class="col-xs-6 col-sm-4 col-md-2">
<div class="ulockd-srvc-column-two one text-center">
<div class="ulockd-srvc-details-two">
<span class="flaticon-work"> </span>
<h5>Safety Work</h5>
</div>
</div>
</div>
</div>
</section>
I try to have multiple p tags in a division, but the paragraphs aren't separating and are just bunching together. The applicable code is as follows:
<div class="row">
<div class="col-md-12 d-flex justify-content-center padding-top">
<p>IMPORTANT LEGAL DISCLAIMER FOR TESTIMONIALS, RISK AND TYPICAL RESULTS, AS WELL AS REFUNDS</p>
<p>Test</p>
</div>
</div>
and the link to codeply is https://www.codeply.com/go/cJ37oz9g4Q. If you go to codeply, then you'll see that "Test" appears immediately after the word "REFUNDS". I have tried modifying the code, looking for known issues, etc.
How can I fix this?
You need to remove d-flex class from this code:
<div class="col-md-12 justify-content-center padding-top">
<p>IMPORTANT LEGAL DISCLAIMER FOR TESTIMONIALS, RISK AND TYPICAL RESULTS, AS WELL AS REFUNDS</p>
<p>Test</p>
</div>
This is because of d-flex class - it forces <p> to become flex-items and by default they align themself along horizontal axis. Replace d-flex and justify-content-center with text-center
.social {
margin: 0;
padding: 0;
}
.social ul {
margin: 0;
padding: 5px;
}
.social ul li {
margin: 5px;
list-style: none outside none;
display: inline-block;
}
.social i {
width: 40px;
height: 40px;
color: #FFF;
background-color: #909AA0;
font-size: 22px;
text-align:center;
padding-top: 12px;
border-radius: 50%;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
-o-border-radius: 50%;
transition: all ease 0.3s;
-moz-transition: all ease 0.3s;
-webkit-transition: all ease 0.3s;
-o-transition: all ease 0.3s;
-ms-transition: all ease 0.3s;
}
.social i:hover {
color: #FFF;
text-decoration: none;
transition: all ease 0.3s;
-moz-transition: all ease 0.3s;
-webkit-transition: all ease 0.3s;
-o-transition: all ease 0.3s;
-ms-transition: all ease 0.3s;
}
.social .fa-facebook:hover {
background: #4060A5;
}
.social .fa-twitter:hover {
background: #00ABE3;
}
.social .fa-instagram:hover {
background: #375989;
}
.social .fa-youtube:hover {
background: #FF1F25;
}
.social .fa-youtube-play:hover {
background: #DF192A;
}
p {
color: #FFF;
}
.paddding-top {
padding-bottom: 15px;
padding-top: 18px;
border-bottom: 1px solid white;
}
/*this is the padding for the form from the top*/
.padding-form-top{
padding-top: 18px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet"/>
<footer class="bg-inverse">
<div class="row">
<div class="col-md-12 d-flex justify-content-center">
<div class="social">
<ul>
<li><i class="fa fa-lg fa-instagram"></i></li>
<li><i class="fa fa-lg fa-facebook"></i></li>
<li><i class="fa fa-lg fa-twitter"></i></li>
<li><i class="fa fa-lg fa-youtube"></i></li>
</ul>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12 text-center padding-top">
<p>IMPORTANT LEGAL DISCLAIMER FOR TESTIMONIALS, RISK AND TYPICAL RESULTS, AS WELL AS REFUNDS</p>
<p>Test</p>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12 d-flex justify-content-center">
<div class="col-md-4 col-md-offset-4 text-center padding-form-top">
<form class="form-width">
<div class="form-group">
<input type="email" class="form-control" id="email" placeholder="Your Email Address">
</div>
<button type="submit" class="btn btn-success">Sign Up for the Latest Updates</button>
</form>
</div>
</div>
</div>
</footer>
I have built a hover effect for my gallery. The gallery is within a Bootstrap Grid.
The hover itself works fine, but in some screen sizes the overlay goes over the gallery images.
Has anybody an idea or a solution or a hint for this problem?
Here an example:
demo
HTML:
<div class="container">
<div class="row">
<div class="col-md-4 col-sm-4">
<a href="http://www.google.com">
<div class="box">
<img class="img-responsive" src="http://placehold.it/300x300" />
<div class="overbox">
<div class="title overtext">Client</div>
<div class="tagline overtext">Tag</div>
</div>
</div>
</a>
</div>
<div class="col-md-4 col-sm-4">
<a href="http://www.google.com">
<div class="box">
<img class="img-responsive" src="http://placehold.it/300x300" />
<div class="overbox">
<div class="title overtext">Client</div>
<div class="tagline overtext">Tag</div>
</div>
</div>
</a>
</div>
<div class="col-md-4 col-sm-4">
<a href="http://www.google.com">
<div class="box">
<img class="img-responsive" src="http://placehold.it/300x300" />
<div class="overbox">
<div class="title overtext">Client</div>
<div class="tagline overtext">Tag</div>
</div>
</div>
</a>
</div>
</div>
</div>
CSS:
.box {
position: relative;
cursor: pointer;
width: 100%;
min-height: 100%;
overflow: hidden;
margin-bottom: 30px;
}
.box .overbox {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 100;
background-color: rgba(204, 36, 42, 0.75);
color: #fff;
opacity: 0;
-webkit-transition: all 300ms ease-out;
-moz-transition: all 300ms ease-out;
-o-transition: all 300ms ease-out;
-ms-transition: all 300ms ease-out;
transition: all 300ms ease-out;
}
.box:hover .overbox {
opacity: 1;
}
.box .title {
font-size: 22px;
line-height: 131%;
font-weight: 400;
text-align: center;
padding-top: 95px;
}
#media (max-width: 991px) {
.box .title {
padding-top: 43px;
}
}
.box .tagline {
position: absolute;
bottom: 0px;
padding-top: 16px;
padding-bottom: 16px;
width: 100%;
display: flex;
justify-content: center;
font-size: 16px;
font-weight: 400;
font-style: italic;
border-top: 1px solid rgb(255, 255, 255);
}
.box_client {
position: relative;
width: 100%;
height: 100%;
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: grayscale(100%);
-webkit-transition: all 300ms ease-out;
-moz-transition: all 300ms ease-out;
-o-transition: all 300ms ease-out;
-ms-transition: all 300ms ease-out;
transition: all 300ms ease-out;
}
.box_client:hover {
background: rgb(235, 234, 233);
-webkit-filter: grayscale(0%);
-moz-filter: grayscale(0%);
-ms-filter: grayscale(0%);
-o-filter: grayscale(0%);
filter: grayscale(0%);
}
.img-responsive {
margin: 0 auto;
}
the overlay goes over the gallery images because you overlay has width:100%; and when the image is smaller than the width of its container the overlay goes over the gallery image because of the width of image
you have 2 options you can make the image width:100% or you can change the style of .box class and remove width:100%; and make its display:inline-block;
.box {
position: relative;
cursor: pointer;
// width: 100%; // remove this
display:inline-block; // add this
min-height: 100%;
overflow: hidden;
margin-bottom: 30px;
}
The Bootstrap column is growing and shrinking while the image has the same fixed size. So .responsive-image is smaller than its parent div. There are a few solutions:
1) Remove the image in the html and have it as a background-image
.box {
background: url(image-url) cover no-repeat;
}
2) Make the image 100% width
.response-image {
width: 100%;
}
3) Or as Ahmed Salama suggests, remove the width: 100% and add display: inline-block;
Your placeholder is smaller then the parent div element, which fits into the whole witdh of it's parent. Thats caused by the class img-responsive, that itself fits the the image to "max-width: 100%". You should use a bigger image or fit it to the size to your parent box, what is not recommended.
In this pen, i changed the placeholdersizes to 767px x 767px: http://codepen.io/pure180/details/OXpNxM/
HTML:
<div class="col-md-4 col-sm-4">
<a href="http://www.google.com">
<div class="box">
<img class="img-responsive" src="http://placehold.it/767x767" />
<div class="overbox">
<div class="title overtext">Client</div>
<div class="tagline overtext">Tag</div>
</div>
</div>
</a>
</div>
<div class="col-md-4 col-sm-4">
<a href="http://www.google.com">
<div class="box">
<img class="img-responsive" src="http://placehold.it/767x767" />
<div class="overbox">
<div class="title overtext">Client</div>
<div class="tagline overtext">Tag</div>
</div>
</div>
</a>
</div>
<div class="col-md-4 col-sm-4">
<a href="http://www.google.com">
<div class="box">
<img class="img-responsive" src="http://placehold.it/767x767" />
<div class="overbox">
<div class="title overtext">Client</div>
<div class="tagline overtext">Tag</div>
</div>
</div>
</a>
</div>
</div>
</div>
I fixed with this
.box {
position: relative;
cursor: pointer;
max-width: 300px;
min-height: 100%;
overflow: hidden;
margin: 0 auto;
margin-bottom: 30px;}
Here's my approach: https://jsfiddle.net/5f285ask/3/
.box {
position: relative;
display: inline-block;
}
.box .overbox {
background-color: rgba(204, 36, 42, 0.75);
height: 100%;
left: 0;
opacity: 0;
position: absolute;
top: 0;
-webkit-transition: all 300ms ease-out;
-moz-transition: all 300ms ease-out;
-o-transition: all 300ms ease-out;
-ms-transition: all 300ms ease-out;
transition: all 300ms ease-out;
width: 100%;
}
.box:hover .overbox {
opacity: 1;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="col-md-4 col-sm-4">
<div class="box">
<a href="#">
<img alt="" src="http://placehold.it/300x300" class="img-responsive">
<div class="overbox">
overbox content
</div>
</a>
</div>
</div>