I am using flex to display pictures. For wide screen all works well but as for for smaller media sizes I would like to see div with the class "base" apper under pictures even when they are displayed in a second an third row. How could I implement this?
Take a look at it on Codepen
<div class="container">
<div class="bookshelf">
<div class="bookshelf-background">
<div class="base"></div>
</div>
<div class="bookshelf-images">
<ul class="container">
<li class="flex flex1">
<a href="#" class="img">
<div style="width: 250px">
<img src="https://image.shutterstock.com/image-illustration/amazing-word-pop-art-retro-
600w-1112517635.jpg" style="width: 150px;">
</div>
</a>
</li>
<li class="flex flex1">
<a href="#" class="img">
<div style="width: 250px">
<img src="https://image.shutterstock.com/image-illustration/amazing-word-pop-art-retro-
600w-1112517635.jpg" style="width: 150px;">
</div>
</a>
</li>
</ul>
</div>
</div>
</div>`
Can you please check with this code, hope it will resolve your query. First, we remove static "base" class div and add background in separate list item using pseudo-element.
.flex {
margin-bottom: 50px;
color: white;
font-size: 20px;
text-align: center;
position: relative;
}
.bookshelf-images .flex {
position: relative;
padding-bottom: 14px;
}
.bookshelf-images .flex:before {
content: "";
width: 100%;
height: 45px;
border-bottom: 9px solid fuchsia;
position: absolute;
left: 0;
bottom: 0;
background: #35091b;
}
.bookshelf-images .flex a{
position: relative;
}
.container {
max-width: 800px;
background: none;
margin-bottom: 0px;
text-align: center;
display: flex;
flex-wrap: wrap;
margin-top: -3px;
}
.container .bookshelf {
display: flex;
position: relative;
}
.container .bookshelf-images {
height: 100%;
}
.container .bookshelf-image {
height: 100%;
position: relative;
max-width: 100%;
display: flex;
}
li {
list-style-type: none;
}
ul {
margin-left: 0;
padding-left: 0;
}
.container .bookshelf-background {
position: absolute;
border: 0px solid #ff0000;
left: 0;
bottom: 45px;
width: 100%;
height: 42px;
}
.container .bookshelf-background .base {
width: 100%;
height: 100%;
border: 0px solid #fff000;
box-shadow: 0px 9px 1px fuchsia;
position: absolute;
background: #35091b;
}
<div class="container">
<div class="bookshelf">
<!-- <div class="bookshelf-background">
<div class="base"></div>
</div> -->
<div class="bookshelf-images">
<ul class="container">
<li class="flex flex1">
<a href="#" class="img">
<div style="width: 250px">
<img
src="https://image.shutterstock.com/image-illustration/amazing-word-pop-art-retro-600w-1112517635.jpg"
style="width: 150px;"
/>
</div>
</a>
</li>
<li class="flex flex1">
<a href="#" class="img">
<div style="width: 250px">
<img
src="https://image.shutterstock.com/image-illustration/amazing-word-pop-art-retro-600w-1112517635.jpg"
style="width: 150px;"
/>
</div>
</a>
</li>
<li class="flex flex1">
<a href="#" class="img">
<div style="width: 250px">
<img
src="https://image.shutterstock.com/image-illustration/amazing-word-pop-art-retro-600w-1112517635.jpg"
style="width: 150px;"
/>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
Related
I need help with position.
This is setup code
<div style="background-color: gray; width: 100%; height: 100vh; display: flex; justify-content: center; ">
<div style="display: flex; flex-direction: column; background-color: rgb(248, 83, 83); width: 300px; position: sticky; bottom:0; ">
<div style="width: 100%; border: 1px solid black; ">Something</div>
And this is code where is problem
<ul >
<div *ngFor="let x of elementList" >
<li style="border: 1px solid black; position: relative; height: 500px; overflow-y: scroll;"> <span>{{x.Title}}</span>
<ul>
<div style="background: pink; position: absolute; right: -50px; top: 0;">
<li >{{x.Subtitle}}</li>
<li >{{x.Subtitle}}</li>
<li >{{x.Subtitle}}</li>
<li >{{x.Subtitle}}</li>
</div>
</ul>
</li>
</div>
</ul>
</div>
<div style="border: 1px solid black; width: 100%; display: flex; gap: 10px; padding: 5px;">
<span class="material-icons-outlined">
arrow_back
</span> <span>Hide navigation</span>
</div>
</div>
<div style="background-color: rgb(152, 247, 152); width: 100%; height: 100%;"></div>
</div>
I working on this for past 5h so can you help me?
This is full code
enter image description here
What I want is set list outside of contaner next to scroll
HTML;
<div id="container">
<div id="middle">
<div id="inner">Something</div>
</div>
<div>
<ul>
<li>List item one</li>
<li>List item two</li>
</ul>
</div>
</div>
To force a container to have a scrollbar, the inner content needs to have a width greater than it's container. Therefore I set the inner div's width to 120% and then put overflow: scroll on the middle div.
Styling;
body {
margin: 0;
}
#container {
background-color: gray;
width: 100%;
height: 100vh;
display: flex;
}
#middle {
display: flex;
flex-direction: column;
background-color: rgb(248, 83, 83);
width: 300px;
position: sticky;
bottom:0;
overflow: scroll;
}
#inner {
width: 120%;
border: 1px solid black;
}
Demo
I'm trying to use sticky to have the div "Sticky" stick to the top of the screen, while allowing for transparency in the background, so they can't just overlap each other. I've seen some videos and tutorials on people getting it to work. but I can't seem to figure it out.
I've read that positions other than relative breaks it. but I don't believe thats used here.
I can't nest it, like i've seen in other posts, as i can't change the html. this is purely css for me.
This would be a good addition to my little project, but even being told its not possible with this html would save me hours of banging my head.
edit: I would like the previous 'Sticky' to move up and/or go away when the next 'Sticky' Appears.
body{
padding: 0;
margin: 0;
}
.Container {
max-width: 200px;
margin: 0 auto;
overflow: hidden scroll;
height: 200px;
}
.Wrapper {
padding: 0;
position: relative;
}
.List {
margin: 0;
padding: 0;
position: relative;
background: black;
}
.Sticky {
height: 20px;
position: sticky;
top: 0;
background: rgba(200,70,70,.8);
}
.Message {
color: white;
height: 20px;
display: block;
text-align: center;
}
.info {
background: green;
color: white;
height: 50px;
display: block;
text-align: center;
}
.spacer {
background: blue;
color: white;
height: 100px;
display: block;
text-align: center;
}
<div class="Container">
<div class="Wrapper">
<ol class="List">
<li class="info">Info</li>
<div class="Sticky">
<span class="Message">Sticky Box</span>
</div>
<li class="info">Info</li>
<li class="info">Info</li>
<li class="info">Info</li>
<div class="Sticky">
<span class="Message">Sticky Box</span>
</div>
<li class="info">Info</li>
<li class="info">Info</li>
<li class="info">Info</li>
<div class="Sticky">
<span class="Message">Sticky Box</span>
</div>
<li class="info">Info</li>
<li class="info">Info</li>
<div class="spacer">Spacer<\div>
</ol>
</div>
</div>
body{
padding: 0;
margin: 0;
}
.Container {
max-width: 200px;
margin: 0 auto;
overflow: hidden scroll;
height: 200px;
}
.Wrapper {
padding: 0;
position: relative;
}
.List {
margin: 0;
padding: 0;
position: relative;
background: black;
}
.Sticky {
height: 20px;
position: sticky;
background: rgba(200,70,70,.8);
}
.Stick1{top: 0;}
.Stick2{top: 20px;}
.Stick3{top: 40px;}
.Message {
color: white;
height: 20px;
display: block;
text-align: center;
}
.info {
background: green;
color: white;
height: 50px;
display: block;
text-align: center;
}
.spacer {
background: blue;
color: white;
height: 100px;
display: block;
text-align: center;
}
<div class="Container">
<div class="Wrapper">
<ol class="List">
<li class="info">Info</li>
<div class="Sticky Stick1">
<span class="Message">Sticky Box</span>
</div>
<li class="info">Info</li>
<li class="info">Info</li>
<li class="info">Info</li>
<div class="Sticky Stick2">
<span class="Message">Sticky Box</span>
</div>
<li class="info">Info</li>
<li class="info">Info</li>
<li class="info">Info</li>
<div class="Sticky Stick3">
<span class="Message">Sticky Box</span>
</div>
<li class="info">Info</li>
<li class="info">Info</li>
<div class="spacer">Spacer<\div>
</ol>
</div>
</div>
[Web design noob]
I'm trying to create layout like below:
Here's what I have tried so far:
.inner,
.outer {
position: relative;
}
.dash {
border: 0;
border-top: 1px dashed #cfcfcf;
}
.vertical-line {
width: 2px;
height: 100px;
background: 100% #4a90e2;
margin: 0 auto;
}
.outer {
width: 10px;
height: 10px;
border: 1px solid #4a90e2;
border-radius: 50%;
}
.inner {
background-color: #4a90e2;
top: 25%;
left: 25%;
width: 50%;
height: 50%;
border: 1px solid #4a90e2;
border-radius: 50%;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Opportunity</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
</head>
<body>
<div>
<div class="container">
<div class="row">
<div class="col">
<h1 style="font-size:15px;padding-top:34px;font-family:Lato, sans-serif;font-weight:bold;">HOW YOU CAN REACH MICHAEL</h1>
<hr style="max-width:60px;height:8px;max-height:8px;margin-left:1px;">
</div>
<div class="col-lg-5" style="margin-top:34px;margin-right:40px;">
<div class="row rounded" style="background-image: linear-gradient(-140deg, #2217A4 0%, #8326B8 100%);">
<div class="col" style="padding-top:5px;">
<h5 style="font-size:10px;color:rgb(255,255,255);font-family:Lato, sans-serif;font-weight:bold;margin-top:1px;">Reach out to Philip, for an introduction</h5>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-lg-1" style="padding-right:0px;padding-left:0px;padding-top:12px;"><img src="https://cdn.pixabay.com/photo/2018/08/28/12/41/avatar-3637425_960_720.png" class="rounded pull-right" style="min-width:50px;max-width:50px;">
<div class="vertical-line" style="margin-right:24px;"></div>
<div class="outer" style="margin-right:0px;padding-right:0px;">
<div class="inner" style="padding-right:-3px;"></div>
</div>
</div>
<div class="col" style="padding-top:12px;">
<h5 style="font-size:15px;margin-bottom:0px;font-family:Lato, sans-serif;font-weight:bold;">John Doe (You)</h5>
<h5 style="color:#797979;font-size:15px;font-family:Lato, sans-serif;">Founder at ESOP International</h5>
<hr class="dash" style="margin-top:45px;">
</div>
<div class="col-md-6"></div>
</div>
<div class="row">
<div class="col-md-6"></div>
<div class="col-md-6"></div>
</div>
<div class="row">
<div class="col-md-6"></div>
<div class="col-md-6"></div>
</div>
<div class="row">
<div class="col-md-6"></div>
<div class="col-md-6"></div>
</div>
</div>
</div>
</body>
</html>
Can anyone please help me in
Aligning vertical and horizontal 'lines' in between cols
Adding rectangle like on right side of layout?
I have changed the layout based on your image structure. Include bootstrap and try the below code. I hope this solution will be helpful.
* {
box-sizing: border-box;
position: relative;
font-family: Lato, sans-serif;
}
.combo-box h5 {
background-image: linear-gradient(-140deg, #2217A4 0%, #8326B8 100%);
font-size: 11px;
color: rgb(255, 255, 255);
font-family: Lato, sans-serif;
font-weight: bold;
padding: 10px 10px;
text-align: center;
border-radius: 3px;
}
.combo-box h3 {
font-size: 15px;
font-family: Lato, sans-serif;
font-weight: bold;
position: relative;
}
.combo-box h3::after {
position: absolute;
content: "";
width: 70px;
background-color: rgba(0, 0, 0, 0.1);
height: 1px;
bottom: -8px;
left: 0;
}
.combo-box {
padding: 0 25px;
}
.combo-box ul {
margin: 0;
padding: 0;
list-style: none;
position: relative;
}
.combo-box ul:last-child:before {}
.combo-box ul::before {
position: absolute;
content: "";
background: #4b90e2;
width: 1px;
height: 100%;
left: 30px;
}
.combo-box ul li {
position: relative;
margin: 0 0 0;
padding: 0 0 0;
list-style: none;
}
.combo-box .img img {
width: 60px;
}
.combo-box .profile-desc h4 {
font-size: 15px;
font-weight: 600;
margin: 0 0 0;
}
.combo-box .profile-desc small {
color: #888;
}
.combo-box li.left {
display: flex;
}
.combo-box ul li.right::after {
position: absolute;
content: "";
width: 12px;
height: 12px;
border: 1px solid #4b90e2;
border-radius: 50%;
left: 25px;
top: 40%;
background: #fff;
padding: 2px;
}
.combo-box ul li.right:before {
border-top: 2px dashed #ccc;
position: absolute;
content: "";
left: 30px;
width: 85%;
top: 50%;
}
.combo-box .inner-desc {
display: flex;
}
.combo-box ul li.right .inner-desc:before {
position: absolute;
content: "";
left: 28px;
background: #4b90e2;
width: 6px;
height: 6px;
border-radius: 50%;
top: 47%;
z-index: 9;
}
.combo-box ul li.right {
text-align: right;
}
.combo-box ul li.right p {
margin-left: auto;
text-align: right;
font-size: 12px;
display: inline-block;
background: #f8f8f8;
border: 1px solid #e6e6e6;
padding: 5px 8px;
margin-bottom: 0;
line-height: 18px;
border-radius: 3px;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container my-5">
<div class="combo-box">
<div class="row">
<div class="col-md-7">
<h3>HOW YOU CAN REACH MICHAEL</h3>
</div>
<div class="col-md-5">
<h5>Reach out to Philip, for an introduction</h5>
</div>
</div>
<ul>
<li class="left">
<div class="img mr-3">
<img src="https://cdn.pixabay.com/photo/2018/08/28/12/41/avatar-3637425_960_720.png" class="img-fluid">
</div>
<div class="profile-desc">
<h4>John Doe (You)</h4>
<small>Founder at ESOP International</small>
</div>
</li>
<li class="right">
<div class="inner-desc">
<p>Lorem Ipsum is simply dummy text of
<br>typesetting industry. </p>
</div>
</li>
</ul>
<ul>
<li class="left">
<div class="img mr-3">
<img src="https://cdn.pixabay.com/photo/2018/08/28/12/41/avatar-3637425_960_720.png" class="img-fluid">
</div>
<div class="profile-desc">
<h4>John Doe (You)</h4>
<small>Founder at ESOP International</small>
</div>
</li>
<li class="right">
<div class="inner-desc">
<p>Lorem Ipsum is simply dummy text of
<br>typesetting industry. </p>
</div>
</li>
</ul>
<ul>
<li class="left">
<div class="img mr-3">
<img src="https://cdn.pixabay.com/photo/2018/08/28/12/41/avatar-3637425_960_720.png" class="img-fluid">
</div>
<div class="profile-desc">
<h4>John Doe (You)</h4>
<small>Founder at ESOP International</small>
</div>
</li>
<li class="right">
<div class="inner-desc">
<p>Lorem Ipsum is simply dummy text of
<br>typesetting industry. </p>
</div>
</li>
</ul>
<ul>
<li class="left">
<div class="img mr-3">
<img src="https://cdn.pixabay.com/photo/2018/08/28/12/41/avatar-3637425_960_720.png" class="img-fluid">
</div>
<div class="profile-desc">
<h4>John Doe (You)</h4>
<small>Founder at ESOP International</small>
</div>
</li>
</ul>
</div>
</div>
I have tried by changing some of the structure
have a look at the pen.
I have used the positioning by position: absolute; of the line and round dot.
Please check and ask if any query
.inner,
.outer {
position: relative;
}
.dash {
border: 0;
border-top: 1px dashed #cfcfcf;
}
.vertical-line {
width: 2px;
height: 100px;
background: 100% #4a90e2;
margin: 0 auto;
}
.outer {
width: 10px;
height: 10px;
border: 1px solid #4a90e2;
border-radius: 50%;
}
.inner {
background-color: #4a90e2;
top: 25%;
left: 25%;
width: 50%;
height: 50%;
border: 1px solid #4a90e2;
border-radius: 50%;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Opportunity</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,700i,900">
<link rel="stylesheet" href="assets/css/styles.min.css">
</head>
<body>
<div>
<div class="container">
<div class="row">
<div class="col">
<h1 style="font-size:15px;padding-top:34px;font-family:Lato, sans-serif;font-weight:bold;">HOW YOU CAN REACH MICHAEL</h1>
<hr style="max-width:60px;height:8px;max-height:8px;margin-left:1px;">
</div>
<div class="col-lg-5" style="margin-top:34px;margin-right:40px;">
<div class="row rounded" style="background-image: linear-gradient(-140deg, #2217A4 0%, #8326B8 100%);">
<div class="col" style="padding-top:5px;">
<h5 style="font-size:10px;color:rgb(255,255,255);font-family:Lato, sans-serif;font-weight:bold;margin-top:1px;">Reach out to Philip, for an introduction</h5>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-lg-1" style="padding-right:0px;padding-left:0px;padding-top:12px;"><div style="
position: relative;
display: inline-block;
"><img src="https://cdn.pixabay.com/photo/2018/08/28/12/41/avatar-3637425_960_720.png" class="rounded pull-right" style="min-width:50px;max-width:50px;">
<div class="vertical-line" style="position: absolute;left: 50%;margin-left: -1px;"></div>
<div class="outer" style="margin-right:0px;padding-right:0px;position: absolute;left: 50%;transform: translateX(-50%);top: 85px;z-index: 9;background-color: white;">
<div class="inner" style="padding-right:-3px;"></div>
</div></div></div>
<div class="col" style="padding-top:12px;">
<h5 style="font-size:15px;margin-bottom:0px;font-family:Lato, sans-serif;font-weight:bold;">John Doe (You)</h5>
<h5 style="color:#797979;font-size:15px;font-family:Lato, sans-serif;">Founder at ESOP International</h5>
<hr class="dash" style="margin-top:45px;">
</div>
<div class="col-md-6"></div>
</div>
<div class="row">
<div class="col-md-6"></div>
<div class="col-md-6"></div>
</div>
<div class="row">
<div class="col-md-6"></div>
<div class="col-md-6"></div>
</div>
<div class="row">
<div class="col-md-6"></div>
<div class="col-md-6"></div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.0/js/bootstrap.bundle.min.js"></script>
</body>
</html>
Here's a link to a CodePen
I have an absolute slider div including images and some arrows, When I add another div, I expect it appear after last div (that is absolute), but it places behind absolute div, I know it's because absolute position is beyond box flow, and I just want to know how to put new div after last absolute div, widout giving margin-top?
HTML code:
<div id="next">
<i class="fa fa-5x fa-angle-right" aria-hidden="true"></i>
</div>
<div id="slider">
<div class="slide">
<img src="images/1.jpg" alt="">
</div>
<div class="slide">
<img src="images/2.jpg" alt="">
</div>
<div class="slide">
<img src="images/3.jpg" alt="">
</div>
</div>
<div id="prev">
<i class="fa fa-5x fa-angle-left" aria-hidden="true"></i>
</div>
<div id="advertises">
</div>
Css code:
#slider{
position: relative;
margin-top: -17px;
}
.slide{
position: absolute;
width: 100%;
height: 400px;
}
.slide img{
width: 100%;
height: 400px;
}
#next, #prev{
width: 70px;
margin-top: 150px;
cursor: pointer;
position: relative;
z-index: 100;
background-color: rgba(255, 255, 255, .5);
display: flex;
justify-content: center;
border-radius: 50%;
}
#next{
margin-right: 25px;
float: right;
}
#prev{
margin-left: 25px;
float: left;
}
#advertises{
width: 50%;
height: 300px;
border: 1px solid #101010;
display: flex;
}
Jsfiddle
When you use absolute positioning you lose the ability to relate that to other elements. That is, you can place a element relatively to other when the other is absolute.
You should try to look for another solution that fits your intention. I don't see the reason to not use a "normal" positioning.
One way is to wrap the slider, then add overflow:auto and height:400px
.wrapper {
overflow: auto;
height: 400px;
}
#slider {
position: relative;
margin-top: -17px;
}
.slide {
position: absolute;
width: 100%;
height: 400px;
}
.slide img {
width: 100%;
height: 400px;
}
#next,
#prev {
width: 70px;
margin-top: 150px;
cursor: pointer;
position: relative;
z-index: 100;
background-color: rgba(255, 255, 255, .5);
display: flex;
justify-content: center;
border-radius: 50%;
}
#next {
margin-right: 25px;
float: right;
}
#prev {
margin-left: 25px;
float: left;
}
#advertises {
clear: both;
width: 50%;
height: 300px;
border: 1px solid #101010;
display: flex;
}
<div class="wrapper">
<div id="next">
<i class="fa fa-5x fa-angle-right" aria-hidden="true"></i>
</div>
<div id="slider">
<div class="slide">
<img src="images/1.jpg" alt="">
</div>
<div class="slide">
<img src="images/2.jpg" alt="">
</div>
<div class="slide">
<img src="images/3.jpg" alt="">
</div>
</div>
<div id="prev">
<i class="fa fa-5x fa-angle-left" aria-hidden="true"></i>
</div>
</div>
<div id="advertises">
</div>
This question already has answers here:
Add rounded borders to selected corners of an element
(2 answers)
Closed 5 years ago.
I have created a broken border effect but I do not want the sharp look on the end of the border I would like it boxed off. I have messed with border-radius and everything i can think of but cant think of anything. Any input would be much appreciated.
I would like for it to look like this:
.container{padding-top: 40px;}
a h3{margin-top:0!important;}
.col-sm-15{
width: 18%;
margin:1%;
height: 4em;
float:left;
position:relative;
}
.col-sm-15 .wrap:before{
content: '';
position: absolute;
width: 50%;
height: calc(100% - 10px);
bottom: 0;
left: 0;
border: 10px solid transparent;
border-bottom-color: #330099;
border-left-color: #330099;
}
.col-sm-15 .wrap:after{
content: '';
position: absolute;
width: 50%;
height: calc(100% - 10px);
top: 0;
right: 0;
border: 10px solid transparent;
border-top-color: #330099;
border-right-color:#330099;
}
a h3{
font-size: 20px;
color: #000000;
padding: 10px;
margin-top: 3.2em;
}
a:hover{text-decoration: none;}
a:hover h3{color: #330099;}
<section id="funnnels">
<div class="container">
<div class="row padd">
<div class="col-sm-15 text-center">
<a href="#">
<div class="wrap">
<h3>Option 1</h3>
</div>
</a>
<div class="clearfix"></div>
</div>
<div class="col-sm-15 text-center">
<a href="#">
<div class="wrap">
<h3>option 2</h3>
</div>
</a>
<div class="clearfix"></div>
</div>
<div class="col-sm-15 text-center">
<a href="#">
<div class="wrap">
<h3>option 3</h3>
</div>
</a>
<div class="clearfix"></div>
</div>
<div class="col-sm-15 text-center">
<a href="#">
<div class="wrap">
<h3>option 4</h3>
</div>
</a>
<div class="clearfix"></div>
</div>
<div class="col-sm-15 text-center">
<a href="#">
<div class="wrap">
<h3>option 5</h3>
</div>
</a>
<div class="clearfix"></div>
</div>
</div>
</div>
</section>
Do like this instead and the border doesn't get a sharp end
border-bottom: 10px solid #330099;
border-left: 10px solid #330099;
I also reduced the height a little more than the set 10px, to 30px (height: calc(100% - 30px);)
Stack snippet
.container {
padding-top: 40px;
}
a h3 {
margin-top: 0!important;
}
.col-sm-15 {
width: 18%;
margin: 1%;
height: 4em;
float: left;
position: relative;
}
.col-sm-15 .wrap:before {
content: '';
position: absolute;
width: 50%;
height: calc(100% - 30px);
bottom: 0;
left: 0;
border-bottom: 10px solid #330099;
border-left: 10px solid #330099;
}
.col-sm-15 .wrap:after {
content: '';
position: absolute;
width: 50%;
height: calc(100% - 30px);
top: 0;
right: 0;
border-top: 10px solid #330099;
border-right: 10px solid #330099;
}
a h3 {
font-size: 20px;
color: #000000;
padding: 10px;
margin-top: 3.2em;
}
a:hover {
text-decoration: none;
}
a:hover h3 {
color: #330099;
}
<section id="funnnels">
<div class="container">
<div class="row padd">
<div class="col-sm-15 text-center">
<a href="#">
<div class="wrap">
<h3>Option 1</h3>
</div>
</a>
<div class="clearfix"></div>
</div>
<div class="col-sm-15 text-center">
<a href="#">
<div class="wrap">
<h3>option 2</h3>
</div>
</a>
<div class="clearfix"></div>
</div>
<div class="col-sm-15 text-center">
<a href="#">
<div class="wrap">
<h3>option 3</h3>
</div>
</a>
<div class="clearfix"></div>
</div>
<div class="col-sm-15 text-center">
<a href="#">
<div class="wrap">
<h3>option 4</h3>
</div>
</a>
<div class="clearfix"></div>
</div>
<div class="col-sm-15 text-center">
<a href="#">
<div class="wrap">
<h3>option 5</h3>
</div>
</a>
<div class="clearfix"></div>
</div>
</div>
</div>
</section>