Bootstrap 3 column gutter - html

I tried to fix this problem multiple times but it still occurs, I just can't find the right fix.
I cannot create gutter around columns in Bootstrap 3. Here's my Fiddle: jsfiddle.net/creuxttL
My exact problem: When I create these three columns, I expect some gutter to be between them, so they don't look like one big brick. I don't get any gutter by default, so I tried to do it manually - with css class .col . I still don't get any margin/padding around the boxes. What should I do?

You're fiddle does not have bootstrap 3 included. http://jsfiddle.net/va94exo2/ is a slight modification.
Have wrapped all of your col-md-4 content with an inner div and changed the ID="row" to class and removed your extra .col class, have also then styled the inner div.
.inner-content{
font-family: 'Roboto', sans-serif;
font-weight: 100;
color: white;
text-align: center;
background-color: #00b9ff;
border: 1px solid black;
}
.overlay-pic {
max-height: 200px;
display: block;
margin: auto;
}
.overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background-color: #44cbff;
overflow: hidden;
width: 100%;
height: 0;
transition: .5s ease;
}
.overlay p {
font-family: 'Raleway';
font-style: italic;
white-space: nowrap;
color: white;
font-size: 20px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
}
.col {
/*gutter*/
padding-right: 7px;
padding-left: 7px;
}
.col:not(:first-child, :last-child) {
padding-right: 7px;
padding-left: 7px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row" style="margin-top: 10px;">
<div class="col-md-4">
<div class="inner-content">
<h1>Festival 2001</h1>
<img src="event.jpg" class="overlay-pic hidden-tablet img-responsive">
<div class="overlay">
<p>Our event.</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="inner-content">
<h1>Who are we?</h1>
<img src="question.jpg" class="overlay-pic hidden-tablet img-responsive">
<div class="overlay">
<p>Read more about us</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="inner-content">
<h1>where, when?</h1>
<img src="calendar.jpg" class="overlay-pic hidden-tablet img-responsive">
<div class="overlay">
<p>Look at our calendar.</p>
</div>
</div>
</div>
</div>
</div>

Not positive this is exactly what you're looking for but if you just want space between the rows you can add a "margin-top" attribute to your css in the ".col-md-4" class.
Hope this helps.
.col-md-4 {
font-family: 'Roboto', sans-serif;
font-weight: 100;
color: white;
text-align: center;
background-color: #00b9ff;
border: 1px solid black;
margin-top:10px;
}
.overlay-pic {
max-height: 200px;
display: block;
margin: auto;
}
.overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background-color: #44cbff;
overflow: hidden;
width: 100%;
height: 0;
transition: .5s ease;
}
.overlay p {
font-family: 'Raleway';
font-style: italic;
white-space: nowrap;
color: white;
font-size: 20px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
}
.col {
/*gutter*/
padding-right: 7px;
padding-left: 7px;
}
.col:not(:first-child, :last-child) {
padding-right: 7px;
padding-left: 7px;
}
<div class="container">
<div id="row" style="margin-top: 10px;">
<div class="col-md-4 col">
<h1>Festival 2001</h1>
<img src="event.jpg" class="overlay-pic hidden-tablet img-responsive">
<div class="overlay">
<p>Our event.</p>
</div>
</div>
<div class="col-md-4 col">
<h1>Who are we?</h1>
<img src="question.jpg" class="overlay-pic hidden-tablet img-responsive">
<div class="overlay">
<p>Read more about us</p>
</div>
</div>
<div class="col-md-4 col">
<h1>where, when?</h1>
<img src="calendar.jpg" class="overlay-pic hidden-tablet img-responsive">
<div class="overlay">
<p>Look at our calendar.</p>
</div>
</div>
</div>
</div>

Bootstrap is not added. I modified your code. And I hope you are expecting this.
.col {
font-family: 'Roboto', sans-serif;
font-weight: 100;
color: white;
text-align: center;
background-color: white;
}
.overlay-pic {
max-height: 200px;
display: block;
margin: auto;
}
.overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background-color: #44cbff;
overflow: hidden;
width: 100%;
height: 0;
transition: .5s ease;
}
.overlay p {
font-family: 'Raleway';
font-style: italic;
white-space: nowrap;
color: white;
font-size: 20px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
}
.col h1{
margin-top:0px;
}
<div class="container">
<div id="row">
<div class="col-md-4 col">
<div style="margin:5px; background:#00b9ff;border: 1px solid black;">
<h1>Festival 2001</h1>
<img src="event.jpg" class="overlay-pic hidden-tablet img-responsive">
<div class="overlay">
<p>Our event.</p>
</div>
</div>
</div>
<div class="col-md-4 col">
<div style="margin:5px; background:#00b9ff;border: 1px solid black;">
<h1>Who are we?</h1>
<img src="question.jpg" class="overlay-pic hidden-tablet img-responsive">
<div class="overlay">
<p>Read more about us</p>
</div></div>
</div>
<div class="col-md-4 col">
<div style="margin:5px; background:#00b9ff;border: 1px solid black;">
<h1>where, when?</h1>
<img src="calendar.jpg" class="overlay-pic hidden-tablet img-responsive">
<div class="overlay">
<p>Look at our calendar.</p>
</div>
</div></div>
</div>
</div>

Related

Need help hiding text/marker/line something next to my images

I have a simple HTML site with CSS going, but i noticed a very very small line next to all my uploaded images that i use for links. I'm guessing that this is like a direction to img position, but it is so small that i can't actually see what it is. Anyone know what it is and how i get rid of it???
Picture or it didn't happen
the 4 images, with 1 working and 3 displaying the thingy
body {
background-image: url("Baggrund.png");
}
.title {
font-family: sans-serif;
color: #2E2E2E;
font-size: 50px;
margin-top: 100px;
font-weight: 1000;
}
.container {
position: relative;
width: 200px;
height: 200px;
display: inline-block;
margin-left: 50px;
margin-top: 50px;
}
.image {
display: block;
width: 200px;
height: 200px;
}
.text {
color: white;
font-size: 20px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-family: sans-serif;
}
.overlayFade {
height: 100%;
width: 100%;
top: 0;
left: 0;
}
.overlay {
position: absolute;
opacity: 0;
transition: all .3s ease;
background-color: #008cba;
}
.container:hover .overlay,
.container:hover .overlayFade {
opacity: 1;
}
<div align="center">
<div>
<div class="container">
<a href="randomsite.com" </a>
<img src="https://dummyimage.com/300x300/3939de/fff" alt="Tips" class="image">
<div class="overlay overlayFade">
<div class="text">QGIS Tips & Tricks</div>
</div>
</div>
<div class="container">
<a href="randomsite.com" </a>
<img src="https://dummyimage.com/300x300/3939de/fff" alt="KortInfo" class="image">
<div class="overlay overlayFade">
<div class="text">KortInfo</div>
</div>
</div>
<div class="container">
<a href="randomsite.com" </a>
<img src="https://dummyimage.com/300x300/3939de/fff" alt="Metadata" class="image">
<div class="overlay overlayFade">
<div class="text">Metadatabasen</div>
</div>
</div>
<div class="container">
<a href="randomsite.com" </a>
<img src="https://dummyimage.com/300x300/3939de/fff" alt="A-Z" class="image">
<div class="overlay overlayFade">
<div class="text">A-Z</div>
</div>
</div>
</div>
That is the underline that is present default in the anchor tag i just used text-decoration: none on the anchor tag and it is gone
I hope this is what you are looking for
body {
background-image: url("Baggrund.png");
}
.title {
font-family: sans-serif;
color: #2E2E2E;
font-size: 50px;
margin-top: 100px;
font-weight: 1000;
}
a
{
text-decoration:none;
}
.container {
position: relative;
width: 200px;
height: 200px;
display: inline-block;
margin-left: 50px;
margin-top: 50px;
}
.image {
display: block;
width: 200px;
height: 200px;
}
.text {
color: white;
font-size: 20px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-family: sans-serif;
}
.overlayFade {
height: 100%;
width: 100%;
top: 0;
left: 0;
}
.overlay {
position: absolute;
opacity: 0;
transition: all .3s ease;
background-color: #008cba;
}
.container:hover .overlay,
.container:hover .overlayFade {
opacity: 1;
}
<div align="center">
<div>
<div class="container">
<a href="randomsite.com" </a>
<img src="https://dummyimage.com/300x300/3939de/fff" alt="Tips" class="image">
<div class="overlay overlayFade">
<div class="text">QGIS Tips & Tricks</div>
</div>
</div>
<div class="container">
<a href="randomsite.com" </a>
<img src="https://dummyimage.com/300x300/3939de/fff" alt="KortInfo" class="image">
<div class="overlay overlayFade">
<div class="text">KortInfo</div>
</div>
</div>
<div class="container">
<a href="randomsite.com" </a>
<img src="https://dummyimage.com/300x300/3939de/fff" alt="Metadata" class="image">
<div class="overlay overlayFade">
<div class="text">Metadatabasen</div>
</div>
</div>
<div class="container">
<a href="randomsite.com" </a>
<img src="https://dummyimage.com/300x300/3939de/fff" alt="A-Z" class="image">
<div class="overlay overlayFade">
<div class="text">A-Z</div>
</div>
</div>
</div>

Portfolio hover overlay not staying in image size

For my portfolio site I am making I have it so when you hover over the portfolio image it overlays the title and category. My problem is the overlay section is picking up the margin and padding for the spacing of the images in the grid. I cant get it to be whatever the portfolio image size is without removing the gutter between the images.
Example below:
Not sure how to fix this and any help would be appreciated.
.thumbnail {
padding: 0px !important;
margin-bottom: 25px;
border: none;
border-radius: 0;
display: block;
}
.thumbnail img {
width: 100%;
height: 100%;
margin-bottom: 0px;
display: block;
}
.overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
opacity: 0;
padding: 0px 0px 0px 0px;
transition: .5s ease;
background-color: rgba(136, 24, 38, 0.6);
}
.thumbnail:hover .overlay {
opacity: 1;
height: 100%;
width: 100%;
}
.text {
color: white;
font-size: 20px;
position: absolute;
width: 70%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
}
<section id="work" class="bg-grey">
<div class="container-fluid text-center">
<h2>MY WORK</h2>
<!--<h4>What we have created</h4>-->
<div class="row text-center">
<div class="col-md-4 col-sm-6 col-xs-12">
<a href="http://www.google.com/">
<div class="thumbnail">
<img src="images/portfolio-img1.jpg" alt="PORTFOLIO NAME">
<div class="overlay">
<div class="text">
<h4>PORTFOLIO NAME</h4>
<p>category</p>
</div>
</div>
</div>
</a>
</div>
<div class="col-md-4 col-sm-6 col-xs-12">
<a href="http://www.google.com/">
<div class="thumbnail">
<img src="images/portfolio-img1.jpg" alt="PORTFOLIO NAME">
<div class="overlay">
<div class="text">
<h4>PORTFOLIO NAME</h4>
<p>category</p>
</div>
</div>
</div>
</a>
</div>
<div class="col-md-4 col-sm-6 col-xs-12">
<a href="http://www.google.com/">
<div class="thumbnail">
<img src="images/portfolio-img1.jpg" alt="PORTFOLIO NAME">
<div class="overlay">
<div class="text">
<h4>PORTFOLIO NAME</h4>
<p>category</p>
</div>
</div>
</div>
</a>
</div>
</div>
</div>
</section>
When you use a absolute positioned element, always set the respective relative, position element. Let me know if you have any issues with the output.
The only CSS change is to the below class. Where I have added the property position: relative.
.thumbnail {
padding: 0px !important;
position: relative;
margin-bottom: 25px;
border: none;
border-radius: 0;
display: block;
}
So your absolute positioned div with class overlay will be positioned with respect to the div with class thumbnail
.thumbnail {
padding: 0px !important;
position: relative;
margin-bottom: 25px;
border: none;
border-radius: 0;
display: block;
}
.thumbnail img {
width: 100%;
height: 100%;
margin-bottom: 0px;
display: block;
}
.overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
opacity: 0;
padding: 0px 0px 0px 0px;
transition: .5s ease;
background-color: rgba(136, 24, 38, 0.6);
}
.thumbnail:hover .overlay {
opacity: 1;
height: 100%;
width: 100%;
}
.text {
color: white;
font-size: 20px;
position: absolute;
width: 70%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
}
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<section id="work" class="bg-grey">
<div class="container-fluid text-center">
<h2>MY WORK</h2>
<!--<h4>What we have created</h4>-->
<div class="row text-center">
<div class="col-md-4 col-sm-6 col-xs-12">
<a href="http://www.google.com/">
<div class="thumbnail">
<img src="http://lorempixel.com/100/100/" alt="PORTFOLIO NAME">
<div class="overlay">
<div class="text">
<h4>PORTFOLIO NAME</h4>
<p>category</p>
</div>
</div>
</div>
</a>
</div>
<div class="col-md-4 col-sm-6 col-xs-12">
<a href="http://www.google.com/">
<div class="thumbnail">
<img src="http://lorempixel.com/100/100/" alt="PORTFOLIO NAME">
<div class="overlay">
<div class="text">
<h4>PORTFOLIO NAME</h4>
<p>category</p>
</div>
</div>
</div>
</a>
</div>
<div class="col-md-4 col-sm-6 col-xs-12">
<a href="http://www.google.com/">
<div class="thumbnail">
<img src="http://lorempixel.com/100/100/" alt="PORTFOLIO NAME">
<div class="overlay">
<div class="text">
<h4>PORTFOLIO NAME</h4>
<p>category</p>
</div>
</div>
</div>
</a>
</div>
</div>
</div>
</section>

Center Font Awesome icons in circles

I have list items with text and they have a plus icon in a circle after them done with the pseudo-element :before. How could I center all the plus icons?
.advantages .item-list-section .item {
position: relative;
margin-bottom: 15px;
}
.advantages .item-list-section .item .inner {
position: relative;
display: inline-block;
}
.advantages .item-list-section .item .inner:after {
position: absolute;
font-family: 'FontAwesome';
content: "\f067";
color: #ef6611;
width: 14px;
height: 14px;
border: 1px solid;
border-radius: 30px;
top: 5px;
right: -30px;
font-size: 8px;
line-height: 14px;
text-align: center;
display:block;
}
.advantages .item-list-section .item .inner.bottom-icon:after {
top: 100%;
margin-top: -18px;
}
.advantages .item-list-section .item.active .inner:after {
background: #f13a01;
color: #ffffff;
content: "\f068";
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"/>
<section class="advantages primary">
<div class="container">
<div class="row">
<div class="col-sm-3 col-sm-offset-1 item-list-section">
<div class="item-list">
<div class="item">
<div class="inner">
<p>Продолжительный<br/>
срок службы</p>
</div>
</div>
<div class="item">
<div class="inner">
<p>Компактные<br/>
размеры</p>
</div>
</div>
<div class="item active">
<div class="inner">
<p>Насос с сухим ротором</p>
</div>
</div>
<div class="item">
<div class="inner">
<p>Котел способен стабильно<br/>работать даже при самом<br/>низком давлении</p>
</div>
</div>
<div class="item">
<div class="inner">
<p>Встроенная защита от<br/>
перепадов напряжения</p>
</div>
</div>
<div class="item">
<div class="inner">
<p>Надежная система<br/>
безопасности</p>
</div>
</div>
<div class="item">
<div class="inner">
<p>Наличие аварийных<br/>
режимов работы</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
Update Css
.advantages .item-list-section .item .inner:after {
position: absolute;
font-family: 'FontAwesome';
content: "\f067";
color: #ef6611;
width: 14px;
height: 14px;
border: 1px solid;
border-radius: 30px;
top: 5px;
right: -30px;
font-size: 8px;
line-height: 16px;
text-align: center;
display:block;
}
Live Demo Here

How to rotate top-border around the circle?

I'm trying to achieve this CSS animation but don't know how to do it. I want to rotate the top-border around the circle but the whole thing is rotating including text. I just want to rotate the top-border on 360 degree. Here is my code snippet below:
div#skill {
/*background: url(../img/white.jpg) center no-repeat;
background-size: cover;*/
background-color: rgba(144, 0, 64,0.8);
color: #fff;
padding: 10px 0;
}
div#skill h3 {
color: #fff;
text-transform: none;
}
div#skill .row {
margin-right: -15px;
margin-left: -15px;
padding: 15px 150px;
}
div#skill .circle {
height: 120px;
width: 120px;
border: 5px solid #ccc;
border-top-color: orange;
border-radius: 60px;
background-color: #74002f;
/*Making the top border to spin*/
animation: spin 2s linear infinite;
}
div#skill .circle:after {
content: url(../img/icons/arrow-point-to-right.png);
position: absolute;
top: 25px;
right: 0;
}
div#skill .circle.last:after{
display: none;
}
.circle .caption {
font-weight: bold;
padding: 20px 24px;
}
.caption h6 {
font-size: 15px;
}
/*Animation on circle*/
#keyframes spin {
from {transform: rotate(0deg);}
to {transform: rotate(360deg);}
}
<div id="skill">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h3>My development process</h3>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="circle">
<div class="caption text-center">
<h6>1</h6>
<h6>Concept</h6>
</div>
</div>
</div>
<div class="col-md-3">
<div class="circle">
<div class="caption text-center">
<h6>2</h6>
<h6>Design</h6>
</div>
</div>
</div>
<div class="col-md-3">
<div class="circle">
<div class="caption text-center">
<h6>3</h6>
<h6>Code</h6>
</div>
</div>
</div>
<div class="col-md-3">
<div class="circle last">
<div class="caption text-center">
<h6 class="text-center">4</h6>
<h6 class="text-center">Launch</h6>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>about my skills</h3>
</div>
<div class="col-md-6">
</div>
</div>
</div>
</div>
Please help me out! Will really appreciate your help in this.Thank you in advance!
div#skill {
/*background: url(../img/white.jpg) center no-repeat;
background-size: cover;*/
background-color: rgba(144, 0, 64, 0.8);
color: #fff;
padding: 10px 0;
}
div#skill h3 {
color: #fff;
text-transform: none;
}
div#skill .row {
margin-right: -15px;
margin-left: -15px;
padding: 15px 150px;
}
div#skill .circle {
height: 120px;
width: 120px;
border: 5px solid #ccc;
border-top-color: orange;
border-radius: 50%;
background-color: #74002f;
/*Making the top border to spin*/
animation: spin 2s linear infinite;
}
div#skill .circle:after {
content: url(../img/icons/arrow-point-to-right.png);
position: absolute;
top: 25px;
right: 0;
}
div#skill .circle.last:after {
display: none;
}
.circle .caption {
font-weight: bold;
padding: 20px 24px;
}
.caption h6 {
font-size: 15px;
}
/*Animation on circle*/
#keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.col-md-3 {
position: relative;
}
.caption {
position: absolute;
z-index: 10;
text-align: center;
left: 65px; /* (120px width + 5+5px border )/2 */
transform: translate(-50%, 0);
}
<div id="skill">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h3>My development process</h3>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="caption text-center">
<h6>1</h6>
<h6>Concept</h6>
</div>
<div class="circle">
</div>
</div>
<div class="col-md-3">
<div class="caption text-center">
<h6>2</h6>
<h6>Design</h6>
</div>
<div class="circle">
</div>
</div>
<div class="col-md-3">
<div class="caption text-center">
<h6>3</h6>
<h6>Code</h6>
</div>
<div class="circle">
</div>
</div>
<div class="col-md-3">
<div class="caption text-center">
<h6 class="text-center">4</h6>
<h6 class="text-center">Launch</h6>
</div>
<div class="circle last">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>about my skills</h3>
</div>
<div class="col-md-6">
</div>
</div>
</div>
</div>
The solution is to make another div that will be behind the .circle with position:absolute; that how, it will "take" the .circle size but not contains the .circle content.
div#skill {
/*background: url(../img/white.jpg) center no-repeat;
background-size: cover;*/
background-color: rgba(144, 0, 64,0.8);
color: #fff;
padding: 10px 0;
}
div#skill h3 {
color: #fff;
text-transform: none;
}
div#skill .row {
margin-right: -15px;
margin-left: -15px;
padding: 15px 150px;
}
div#skill .circle {
position:relative;
height: 120px;
width: 120px;
border: 5px solid #ccc;
/*border-top-color: orange;*/
border-radius: 50%;
background-color: #74002f;
}
div#skill .circle:after {
content: url(../img/icons/arrow-point-to-right.png);
position: absolute;
top: 25px;
right: 0;
}
div#skill .circle.last:after{
display: none;
}
.circle .caption {
font-weight: bold;
padding: 20px 24px;
position:relative;
z-index:1;
}
.caption h6 {
font-size: 15px;
}
.circle-rotate {
height: 100%;
width: 100%;
border-top: 5px solid orange;
border-radius: 60px;
background-color: #74002f;
/*Making the top border to spin*/
animation: spin 2s linear infinite;
position:absolute;
top:0;
left:0;
}
/*Animation on circle*/
#keyframes spin {
from {transform: rotate(0deg);}
to {transform: rotate(360deg);}
}
<div id="skill">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h3>My development process</h3>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="circle">
<div class="circle-rotate"></div>
<div class="caption text-center">
<h6>1</h6>
<h6>Concept</h6>
</div>
</div>
</div>
<div class="col-md-3">
<div class="circle">
<div class="caption text-center">
<h6>2</h6>
<h6>Design</h6>
</div>
</div>
</div>
<div class="col-md-3">
<div class="circle">
<div class="caption text-center">
<h6>3</h6>
<h6>Code</h6>
</div>
</div>
</div>
<div class="col-md-3">
<div class="circle last">
<div class="caption text-center">
<h6 class="text-center">4</h6>
<h6 class="text-center">Launch</h6>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>about my skills</h3>
</div>
<div class="col-md-6">
</div>
</div>
</div>
</div>

Styling Divs - Drop Shadow through the middle of other div

I'm trying to create CSS styles that LOOK like a flip counter but don't actually function as one. I've got the general look and feel figured out, but I can't seem to get my box-shadow to overlap the display number.
This is what I have so far:
.numberwrapper {
width: 50px;
height: 90px;
background-color: black;
border-radius: 5px;
position: relative;
display: inline-block;
}
.shadow {
width: 100%;
height: 50%;
z-index: 100;
box-shadow: 0px 5px 4px -2px #888888;
}
.number {
font-family: 'Tahoma', sans-serif;
top: -90;
color: #ffffff;
font-size: 85px;
line-height: 0px;
text-align: center;
}
.bigcomma {
font-family: 'Tahoma', sans-serif;
font-size: 85px;
color: black;
}
<div class="numberwrapper">
<div class="shadow">
</div>
<div class="number">
1
</div>
</div>
<span class="bigcomma">,</span>
<div class="numberwrapper">
<div class="shadow">
</div>
<div class="number">
2
</div>
</div>
<div class="numberwrapper">
<div class="shadow">
</div>
<div class="number">
3
</div>
</div>
<div class="numberwrapper">
<div class="shadow">
</div>
<div class="number">
4
</div>
</div>
Like I said, my biggest issue is that I can't get my .shadow div to show up on top of the number.
Add "position: relative" to .shadow for the z-index to kick in:
.numberwrapper {
width: 50px;
height: 90px;
background-color: black;
border-radius: 5px;
position: relative;
display: inline-block;
}
.shadow {
width: 100%;
height: 50%;
z-index: 100;
box-shadow: 0px 5px 4px -2px #888888;
position: relative;
}
.number {
font-family: 'Tahoma', sans-serif;
top: -90;
color: #ffffff;
font-size: 85px;
line-height: 0px;
text-align: center;
}
.bigcomma {
font-family: 'Tahoma', sans-serif;
font-size: 85px;
color: black;
}
<div class="numberwrapper">
<div class="shadow">
</div>
<div class="number">
1
</div>
</div>
<span class="bigcomma">,</span>
<div class="numberwrapper">
<div class="shadow">
</div>
<div class="number">
2
</div>
</div>
<div class="numberwrapper">
<div class="shadow">
</div>
<div class="number">
3
</div>
</div>
<div class="numberwrapper">
<div class="shadow">
</div>
<div class="number">
4
</div>
</div>