Dont Know what i am missing Please CHeck looking forward to your guideness
here is code
html
<button title="Register" class="bn1">Register</button>
<!--Starting of Modal Making-->
<div id="openModal" class="modalDialog">
<div>
X
<div id="modaltext">
<h2>Regisration Form</h2>
<p></p>
<p>Photopool provides you three packages .....You can Check Our packages Here as Well as You can Join us Free :)</p>
<p>Photopool welcomes You here :)</p>
</div>
</div>
``</div>
<!--Ending of Modal-->
html of below div (join us )
<div id="content">
<div id="textcontent" align="center">
<hgroup id="text">
<p class="line1" style="width:160px;height:28px;">Join Us!! </p><br/>
<p class="line2" style="width:24px;height:19px;"> on</p><br/>
<p class="line3" style="width:150px;height:30px;">Photopool</p> <p class="line31" align=right" style="width:50px;height:20px;"> .com </p><br/>
<p class="line4" style="width:18px;height:30px;">U</p><p class="line41" style="width:69px;height:30px;">pload </p>
<p class="line5" style="width:20px;height:30px;">S</p><p class="line51" style="width:59px;height:30px;">hare </p>
<p class="line6" style="width:20px;height:30px;">D</p><p class="line61" style="width:116px;height:30px;">ownload</p><br/>
<p class="line7" style="width:170px;height:30px;">Photoshoots </p><br/>
<hr/>
<p class="line8" style="width:130px;height:20px;">Check</p><p class="line81" style="width:130px;height:33px;"> HERE</p><br/>
<p class="line9" style="width:200px;height:30px;">Our Exciting</p><br/>
<p class="line10" style="width:194px;height:43px;">Membership</p>
<p class="line11" style="width:80px;height:30px;">Plans</p>
</hgroup>
</div>
CSS of Modal and its div
/MODAL styling/
.modalDialog {
position: fixed;
font-family: Arial, Helvetica, sans-serif;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,1.9);
z-index: 99999;
-webkit-transition: opacity 400ms ease-in;
-moz-transition: opacity 400ms ease-in;
transition: opacity 400ms ease-in;
pointer-events: none;
}
.modalDialog:target {
opacity:1;
pointer-events: auto;
}
.modalDialog > div {
width: 400px;
position:relative;
margin: 10% auto;
padding: 5px 20px 13px 20px;
border-radius: 10px;
background: #000000;
background: -moz-linear-gradient(#FFFFFF, #999);
background: -webkit-linear-gradient(#fff, #999);
background: -o-linear-gradient(#fff, #999);
}
css of below div (join us )
#textcontent{
margin-top:1.5%;
float:right;
width: 39%;
height:62%;
margin-right:4%;
transform:rotate(-1deg);
-ms-transform:rotate(-1deg); /* IE 9 */
-webkit-transform:rotate(-1deg); /* Safari and Chrome */
}
#text{
padding-left:24px;
padding-right:27px;
margin-right:5%;
background-color:/*#EED2EE*/#000000;
margin-top: 1.4%;
background:rgba(0, 0, 0, 0.5);
width:75%;
height:95%;
border-radius:10px;
box-shadow: 0 0 1em 0em #ccc;
}
i just want to make this registration form prominant ..SOS !!!
the problem was the z-index ..
Here I've modify a CSS little bit. just remove the z-index:99999 and give the z-index property to div child of div which id is "openModal"
Here is jsfiddle!
I hope this is you are looking for.
Related
This is the portion of my HTML: I want to have to the text fixed to an image and not disappear when I stop hovering on the text.
.overlay1 {
position: relative;
bottom: 0;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.5); /* Black see-through */
color: #f1f1f1;
width: 100%;
transition: .5s ease;
opacity:0;
color: white;
font-size: 20px;
padding: 20px;
text-align: center;
}
/*Test hover*/
.container1:hover .overlay1 {
opacity: 0.5;
}
<div class="container1">
<a href="/content/gallery">
<div class="columny">
<div class="row1">
<img src="sites/chau.ac.zm/themes/chau/images/AF.jpg" alt="Snow" class="image" style="width:100%">
<!-- <div class="overlay1"> -->
<div class="overlay1">Gallery</div>
<!-- </div> -->
</div>
</div>
</a>
</div>
If I get you right, you want div.overlay1 to
be invisible initially
be visible on hover over div.container1
stay visible even if you hover out of div.container1
You cannot achieve 3. without using JavaScript.
I suggest this code:
/* You need this container to limit the .overlay1 position */
.img-container {
position: relative;
}
.overlay1 {
position: absolute;
bottom: 0;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.5); /* Black see-through */
color: #f1f1f1;
width: 100%;
transition: .5s ease;
opacity:0;
color: white;
font-size: 20px;
padding: 20px;
text-align: center;
}
/*Test hover - change :hover to class .visible */
.container1.visible .overlay1 {
opacity: 0.5;
}
<div id="container1" class="container1">
<a href="/content/gallery">
<div class="columny">
<div class="row1">
<div class="img-container">
<img src="https://images.unsplash.com/photo-1462899006636-339e08d1844e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=750&h=150&q=80" alt="Snow" class="image" style="width:100%">
<!-- <div class="overlay1"> -->
<div class="overlay1">Gallery</div>
<!-- </div> -->
</div>
</div>
</div>
</a>
</div>
<script>
// get element
var container1 = document.getElementById("container1");
// add hover event function
container1.addEventListener("mouseover", function() {
container1.className = "container1 visible";
});
</script>
See the solution if it works!
Just one question:
If you need a text to be fixed to an image, then why are you using hover?
.overlay1 {
position: absolute;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.5); /* Black see-through */
color: #f1f1f1;
width: auto;
transition: .5s ease;
opacity:1;
color: white;
font-size: 20px;
padding: 20px;
text-align: center;
right:-20px;
top:50%;
}
.row1{
position:relative;
width:500px; margin:0 auto;
}
<div class="container1">
<a href="/content/gallery">
<div class="columny">
<div class="row1">
<img src="https://image.shutterstock.com/image-photo/field-spring-flowers-sunlight-450w-377208970.jpg" alt="" />
<!-- <div class="overlay1"> -->
<div class="overlay1">Gallery</div>
<!-- </div> -->
</div>
</div>
</a>
</div>
remove class from gallery div
<div class="overlay1">Gallery</div> remove the class and use without any "overlay1"class
I am doing a popup image with close button and dimmed background. When the popup is displayed and users click outside of it, it supposes to close the popup. It works fine on other browser, but not safari. I found on Z-index problems on ipad that I need to put -webkit-transform: translate3d(0,0,0) to the same DOM level but I am not really sure about the concept. Can someone help me, please?
Here is my code:
/**********************HTMl*********************/
<body id="price">
<div class="site-wrapper">
<div class="site-wrapper-inner">
<div class="cover-container">
<?php include('header.php')?>
<div id="content-border" >
<div id="content">
<h1><strong>Packages</strong></h1>
<P id="package-p"></P>
<div>
<div id="price-col">
<button class="img-circle" id="price-circle" id="myBtn1" onClick="openPopup(1)">
<div>
<h4></h4>
<span id="currency">$</span>
<span id="price-large"></span>
<p id="price-small"></p>
<p></p>
</div>
</button>
</div>
<div id="myModal1" class="popup">
<div class="popup-content">
<img src="images/The-Apprentice_low.jpg" id="popup-content1"><span class="closeBtn" onClick="closePopup()">×</span>
</div>
</div>
<div id="price-col">
<button class="img-circle" id="price-circle" id="myBtn2" onClick="openPopup(2)">
<div>
<h4></h4>
<span id="currency">$</span>
<span id="price-large"></span>
<p id="price-small"></p>
<p></p>
</div>
</button>
</div>
<div id="myModal2" class="popup">
<div class="popup-content">
<img src="images/The-Celebrity-Chef_low.jpg" id="popup-content2"><span class="closeBtn" onClick="closePopup()">×</span>
</div>
</div>
</div>
</div>
</div>
<?php include('footer.php')?>
</div>
</div>
</div>
<?php include('html-body-end.php')?>
</body>
/*************************CSS***********************/
#package-p{
background-color: #fff;
color: #000;
padding: 10 20;
text-shadow: none;
}
#price-col{
margin:0 auto;
width:50%;
float: left;
text-align: center;
}
#price-circle{
margin: 30 auto;
background: #ffffff;
padding: 35px;
text-align: center;
height: 250px;
width: 250px;
display: table;
color: #222222;
box-shadow: 0px 0px 10px 5px rgba(206, 44, 44, 0.5);
border: 0;
transition: all 0.3s;
-moz-transition: all 0.3s; /* Firefox 4 */
-webkit-transition: all 0.3s; /* Safari and Chrome */
-o-transition: all 0.3s; /* Opera */
}
#price-circle > div{
display: table-cell;
vertical-align: middle;
}
#currency{
font-size: 30px;
}
#price-circle:hover{
box-shadow: 0px 0px 10px 5px rgba(255, 255, 255, 0.5);
background-color: #ce2c2c;
color: #fff;
}
/*Popup*/
.popup {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
/* padding-top: 300px; Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
text-align: center;
}
.popup-content {
margin: auto;
color: #ffffff;
display: inline-block;
position: relative;
}
.popup::after, .popup::before{
display: block;
content: "";
height: 5%;
}
.popup-content img{
max-height: 90vh;
max-width: 90vw;
min-height: 170px;
min-width: 240px;
z-index: 10;
}
/* The Close Button */
.closeBtn{
color: rgba(255,255,255,5);
font-size: 36px;
font-weight: bold;
position: absolute;
margin-top: -2.1vh;
right: 0;
display: inline-block;
z-index: 10;
}
.closeBtn:hover, .closeBtn:focus{
color: #000;
cursor: pointer;
}
Thanks.
I'm trying to get an overlay or box shadow on top of a row of images. Then when you hover over these images, the opacity of the shadow should change from 0.5 to 0.8 for that image. I have already tried the pseudo technique suggested here:
How To Get Shadow With Certain Opacity Over Images CSS
And applied styles to the divs beneath the images as it was suggested here:
Why doesn't inset box-shadow work over images?
Me + several other people haven't been able to figure this out.
The goal is to get the images to look the same as the other three images above the row - the picture of the business presentation, the picture of the business meeting, and the picture of the businesswoman. Each of them have an initial box shadow over them with 50% opacity - then when you hover over the buttons (see my work, contact, and visit store), the opacity over the image should change from 50% to 80%. We want that same technique to be applied to the images in the row.
HTML:
<div class="row thumbnail-row">
<div class="my-work-image" id="margin-left-image">
<img class="thumbnail-image" src="/wp-content/themes/gatewaywebdesign/assets/images/hamburger-thumbnail.jpg" />
<div class="img__description_layer">
<span class="img__description">The Hamburger Collection</span>
</div>
</div>
<div class="my-work-image">
<img class="thumbnail-image" src="/wp-content/themes/gatewaywebdesign/assets/images/yoyomoi-thumbnail.jpg" />
<div class="img__description_layer">
<span class="img__description">YoYoMoi</span>
</div>
</div>
<div class="my-work-image">
<img class="thumbnail-image" src="/wp-content/themes/gatewaywebdesign/assets/images/dogs-thumbnail.jpg" />
<div class="img__description_layer">
<span class="img__description">Dogs On Duty</span>
</div>
</div>
<div class="my-work-image">
<img class="thumbnail-image" src="/wp-content/themes/gatewaywebdesign/assets/images/gateway-thumbnail.jpg" />
<div class="img__description_layer">
<span class="img__description">Gateway Web Design</span>
</div>
</div>
<div class="my-work-image">
<img class="thumbnail-image" src="/wp-content/themes/gatewaywebdesign/assets/images/chameleon-thumbnail.jpg" />
<div class="img__description_layer">
<span class="img__description">Chameleon Web Solutions</span>
</div>
</div>
<div class="my-work-image">
<img class="thumbnail-image" src="/wp-content/themes/gatewaywebdesign/assets/images/adrienne-thumbnail.jpg" />
<div class="img__description_layer">
<span class="img__description">Adrienne Levin Coleman</span>
</div>
</div>
<div class="my-work-image">
<img class="thumbnail-image" src="/wp-content/themes/gatewaywebdesign/assets/images/castaway-thumbnail.jpg" />
<div class="img__description_layer">
<span class="img__description">Castaway Vacations</span>
</div>
</div>
CSS:
.thumbnail-row {
display: flex;
margin-top: 40px;
box-shadow: 0px 0px 0px 4000px rgba(27, 61, 88, 0.5) inset;
}
.thumbnail-row div::after {
position: relative;
top: 0; left: 0;
width: 100%;
height: 100%;
box-shadow: 0px 0px 0px 4000px rgba(27, 61, 88, 0.5) inset;
}
.thumbnail-image {
display: inline-block;
width: 100%;
/*opacity: 0.5;*/
/*box-shadow: inset 0 0 0 4000px rgba(27,61,88,.5)!important;*/
}
.my-work-image{
position:relative;
}
.img__description_layer {
position: absolute;
top: 0;
bottom: 0;
left: 0; /*change it to 50%, if you want the text only shows in the half part */
right: 0;
background: rgba(27,61,88, 0.8);
color: #ffffff;
visibility: hidden;
opacity: 0;
display: flex;
align-items: center;
text-align:center;
font-family: 'proxima_nova_ltsemibold';
box-shadow: 0px 0px 0px 4000px rgba(27, 61, 88, 0.5) inset;
/* transition effect. not necessary */
transition: opacity ease-in-out 0.4s, visibility ease-in-out 0.4s;
/*transition: box-shadow 0.4s ease-in-out;*/
}
.my-work-image:hover .img__description_layer {
visibility: visible;
opacity: 1;
}
.img__description {
transition: .2s;
transform: translateY(1em);
margin: 0 auto;
}
.my-work-image:hover .img__description {
transform: translateY(0);
}
#margin-left-image {
margin-left: 15px;
}
JSFiddle
Any other ideas for getting the images to have an initial box shadow over them?
The box-shadow isn't showing because the box-shadow is on the parent of the imgs, so the imgs are covering the box-shadow. You can move the imgs behind the parent by adding position: relative; z-index: -1;
.thumbnail-row {
display: flex;
margin-top: 40px;
box-shadow: 0px 0px 0px 4000px rgba(27, 61, 88, 0.5) inset;
}
.thumbnail-row div::after {
position: relative;
top: 0; left: 0;
width: 100%;
height: 100%;
box-shadow: 0px 0px 0px 4000px rgba(27, 61, 88, 0.5) inset;
}
.thumbnail-image {
display: inline-block;
width: 100%;
/*opacity: 0.5;*/
/*box-shadow: inset 0 0 0 4000px rgba(27,61,88,.5)!important;*/
}
.my-work-image{
position:relative;
}
.img__description_layer {
position: absolute;
top: 0;
bottom: 0;
left: 0; /*change it to 50%, if you want the text only shows in the half part */
right: 0;
background: rgba(27,61,88, 0.8);
color: #ffffff;
visibility: hidden;
opacity: 0;
display: flex;
align-items: center;
text-align:center;
font-family: 'proxima_nova_ltsemibold';
box-shadow: 0px 0px 0px 4000px rgba(27, 61, 88, 0.5) inset;
/* transition effect. not necessary */
transition: opacity ease-in-out 0.4s, visibility ease-in-out 0.4s;
/*transition: box-shadow 0.4s ease-in-out;*/
}
.my-work-image:hover .img__description_layer {
visibility: visible;
opacity: 1;
}
.img__description {
transition: .2s;
transform: translateY(1em);
margin: 0 auto;
}
.my-work-image:hover .img__description {
transform: translateY(0);
}
#margin-left-image {
margin-left: 15px;
}
.thumbnail-image {
position: relative;
z-index: -1;
}
<div class="row thumbnail-row">
<div class="my-work-image" id="margin-left-image">
<img class="thumbnail-image" src="http://i.imgur.com/mNoKbYK.jpg" />
<div class="img__description_layer">
<span class="img__description">The Hamburger Collection</span>
</div>
</div>
<div class="my-work-image">
<img class="thumbnail-image" src="http://i.imgur.com/8b2sb03.jpg" />
<div class="img__description_layer">
<span class="img__description">YoYoMoi</span>
</div>
</div>
<div class="my-work-image">
<img class="thumbnail-image" src="http://i.imgur.com/Ac11pRH.jpg" />
<div class="img__description_layer">
<span class="img__description">Dogs On Duty</span>
</div>
</div>
<div class="my-work-image">
<img class="thumbnail-image" src="http://i.imgur.com/DgNt5MQ.jpg" />
<div class="img__description_layer">
<span class="img__description">Gateway Web Design</span>
</div>
</div>
<div class="my-work-image">
<img class="thumbnail-image" src="http://i.imgur.com/SG0bpMU.jpg" />
<div class="img__description_layer">
<span class="img__description">Chameleon Web Solutions</span>
</div>
</div>
<div class="my-work-image">
<img class="thumbnail-image" src="http://i.imgur.com/x1DxQwd.jpg" />
<div class="img__description_layer">
<span class="img__description">Adrienne Levin Coleman</span>
</div>
</div>
<div class="my-work-image">
<img class="thumbnail-image" src="http://i.imgur.com/YcnOqR1.jpg" />
<div class="img__description_layer">
<span class="img__description">Castaway Vacations</span>
</div>
</div>
</div><!--end row-->
Im trying to on hover make text appear under these circles but when ever I try to add paragraphs they just make my circles go out of place.
This is what I'm trying to achieve
http://imgur.com/TZfpQIF
https://jsfiddle.net/u02e1mfe/
HTML
<div class="row">
<p><b>Works</b></p>
<div "row1">
<div class="round-button">
<div class="round-button-circle" class=".col-md-4">
Google
</div>
</div>
<div class="round-button">
<div class="round-button-circle" class=".col-md-4">
nn
</div>
</div>
<div class="round-button">
<div class="round-button-circle" class=".col-md-4">
nm
</div>
</div>
</div>
<div "row2">
<div class="round-button">
<div class="round-button-circle" class=".col-md-4">
nn
</div>
</div>
<div class="round-button">
<div class="round-button-circle" class=".col-md-4">
nff
</div>
</div>
<div class="round-button">
CSS
.row
{
height: 80%;
width: 100%;
text-align:center;
padding-top: 2%;
font-size: 25;
}
.round-button {
display:inline-block;
position: relative;
width:10%;
padding-top: 2%;
}
.round-button-circle {
height: 100px;
position:relative;
margin:0 auto;
border:2px solid #f0f0f0;
background: white no-repeat center center;
-moz-border-radius:100px;
-webkit-border-radius:100px;
border-radius: 100px;
width: 100px;
cursor:pointer;
-webkit-transition: all 0.2s ease-in;
-moz-transition: all 0.2s ease-in;
-ms-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in;
font-size: 0%;
}
.round-button-circle:hover {
background:#000000;
text-decoration-color: white;
font-size: 50%;
margin-bottom: 80%;
}
.round-button a{
display:block;
float:left;
width:100%;
padding-top:50%;
padding-bottom:50%;
line-height:1em;
margin-top:-0.5em;
text-align:center;
color:#e2eaf3;
font-family:Verdana;
font-size:1.2em;
font-weight:bold;
text-decoration:none;
}
They are close together in the fiddle but in my actual website they aren't like that so just ignore it. Im trying to make the text appear below the circle when you hover over it. Any ideas? New to CSS and HTML
Add these lines to .round-button a css
position: absolute;
bottom: -90px;
color: red;
(You can replace the color, is just for you to notice the change)
Looks like there is a chrome bug that hides content of columns greater than one. Really stumped on this one. Also looks like the easing on the hover is not working nicely on columns 2 and 3 as well.
<div class="col3">
<div id="box">
<div class="content-item-description">
Weekly Sales - Limited Time Only - While Supplies Last!
</div>
<div id="overlay">
<span id="plus">This is cool</span>
</div>
</div>
<div id="box">
<div class="content-item-description">
Weekly Sales - Limited Time Only - While Supplies Last!
</div>
<div id="overlay">
<span id="plus">This is cool</span>
</div>
</div>
<div id="box">
<div class="content-item-description">
Weekly Sales - Limited Time Only - While Supplies Last!
</div>
<div id="overlay">
<span id="plus">This is cool</span>
</div>
</div>
</div>
and here is the CSS
body {
background: #e7e7e7;
}
#box {
width: 300px;
height: 200px;
box-shadow: inset 1px 1px 40px 0 rgba(0,0,0,.45);
border-bottom: 2px solid #fff;
border-right: 2px solid #fff;
margin: 5% auto 0 auto;
background: url(http://ianfarb.com/wp-content/uploads/2013/10/nicholas-hodag.jpg);
background-size: cover;
border-radius: 5px;
overflow: hidden;
position: relative;
}
#overlay {
background: rgba(0,0,0,.60);
text-align: center;
padding: 45px 0 66px 0;
opacity: 0;
-webkit-transition: opacity .25s ease;
-moz-transition: opacity .25s ease;
height: 100%;
}
#box:hover #overlay {
opacity: 1;
}
#plus {
font-family: Helvetica;
font-weight: 900;
color: rgba(255,255,255,.85);
font-size: 12px;
}
.content-item-description {
position: absolute;
}
.col3 {
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;
}
Codepen Example: http://codepen.io/anon/pen/GjyKE
first of all, all your div elements are using IDs, change them to classes or you won't be able to re-use them. So, your HTML should look like this:
<div class="col3">
<div class="box">
<div class="content-item-description">Weekly Sales - Limited Time Only - While Supplies Last!</div>
<div class="overlay"> <span class="plus">This is cool</span>
</div>
</div>
<div class="box">
<div class="content-item-description">Weekly Sales - Limited Time Only - While Supplies Last!</div>
<div class="overlay"> <span class="plus">This is cool</span>
</div>
</div>
<div class="box">
<div class="content-item-description">Weekly Sales - Limited Time Only - While Supplies Last!</div>
<div class="overlay"> <span class="plus">This is cool</span>
</div>
</div>
</div>
Now, with proper HTML, we can make better use of CSS, like this:
body {
background:#e7e7e7;
}
.box {
width:300px;
height:200px;
box-shadow:inset 1px 1px 40px 0 rgba(0, 0, 0, .45);
border-bottom:2px solid #fff;
border-right:2px solid #fff;
margin:5% auto 0 auto;
background:url(http://ianfarb.com/wp-content/uploads/2013/10/nicholas-hodag.jpg);
background-size:cover;
border-radius:5px;
overflow:hidden;
position: relative;
display:inline-block;
}
.overlay {
background:rgba(0, 0, 0, .60);
text-align:center;
padding:45px 0 66px 0;
opacity:0;
top:0;
left:0;
position:absolute;
transition: all .5s ease;
height: 100%;
width:100%;
z-index:5
}
.box:hover > .overlay {
opacity:1;
}
.plus {
font-family:Helvetica;
font-weight:900;
color:rgba(255, 255, 255, .85);
font-size:12px;
}
.content-item-description {
position: relative;
top:0;
left:0;
z-index:100;
width:100%;
height:50%;
}
In short, nothing wrong with Chrome (at least in this case), but all fault is on your coding
See you forked Codepen example
TRY - DEMO
It's a bit hack:
Use transform: translateX(-0.99px); and margin: 0px -0.5px; to the first div#box
Note: margin = -0.5px and transform = -0.99px doesn't apply any extra margin or width to your HTML elements and it also doesn't force the div#box to move or push the Next Pixel.
You can also use below CSS properties for only webkit broswers:
-webkit-margin-start: -0.5px;
-webkit-margin-end: -0.5px;
-webkit-transform: translateX(-0.99px);
HTML:
<div class="col3">
<div class="box" style="transform: translateX(-0.99px); margin: 0px -0.5px;">
<div class="content-item-description">Weekly Sales - Limited Time Only - While Supplies Last!</div>
<div class="overlay">
<span class="plus">This is cool</span>
</div>
</div>
<div class="box">
<div class="content-item-description">Weekly Sales - Limited Time Only - While Supplies Last!</div>
<div class="overlay">
<span class="plus">This is cool</span>
</div>
</div>
<div class="box">
<div class="content-item-description">Weekly Sales - Limited Time Only - While Supplies Last!</div>
<div class="overlay">
<span class="plus">This is cool</span>
</div>
</div>
</div>
CSS:
body {
background:#e7e7e7;
}
.box {
width:300px;
height:200px;
box-shadow:inset 1px 1px 40px 0 rgba(0,0,0,.45);
border-bottom:2px solid #fff;
border-right:2px solid #fff;
margin:5% auto 0 auto;
background:url(http://ianfarb.com/wp-content/uploads/2013/10/nicholas-hodag.jpg);
background-size:cover;
border-radius:5px;
overflow:hidden;
position: relative;
}
.overlay {
background:rgba(0,0,0,.60);
text-align:center;
padding:45px 0 66px 0;
opacity:0;
-webkit-transition: opacity .25s ease;
-moz-transition: opacity .25s ease; height: 100%;}
.box:hover #overlay {
opacity:1;
}
.plus {
font-family:Helvetica;
font-weight:900;
color:rgba(255,255,255,.85);
font-size:12px;
}
.content-item-description {
position: absolute;
}
.col3 {
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;
}