This question already has answers here:
Elongated hexagon shaped button using only one element
(4 answers)
Closed 7 years ago.
I need to code a polygon button that has an outline with pure css and html. This is what I have right now but I can't figure out how to add the outline. This need to be supported in IE as well. How do I do this?
/**** CSS ***/
#statement .polygon {
width: 290px;
height: 75px;
background: #590f20;
position: relative;
color: #F94141;
text-align: center;
font-size: 1.8em;
line-height: 2.9em;
font-weight: 400;
text-transform: uppercase;
margin-top: 50px;
margin-bottom: 35px;
}
#statement .bottom:before {
content: "";
position: absolute;
top: 0;
left: -50px;
width: 0;
height: 0;
border-left: 25px solid transparent;
border-right: 25px solid #590f20;
border-bottom: 37.5px solid transparent;
}
#statement .bottom:after {
content: "";
position: absolute;
top: 0px;
left: 290px;
width: 0;
height: 0;
border-left: 25px solid #590f20;
border-right: 25px solid transparent;
border-bottom: 37.5px solid transparent;
}
#statement .top:before {
content: "";
position: absolute;
bottom: 37.5px;
left: -50px;
width: 0;
height: 0;
border-left: 25px solid transparent;
border-right: 25px solid #590f20;
border-top: 37.5px solid transparent;
}
#statement .top:after {
content: "";
position: absolute;
bottom: 37.5px;
left: 290px;
width: 0;
height: 0;
border-left: 25px solid #590f20;
border-right: 25px solid transparent;
border-top: 37.5px solid transparent;
}
<div id="statement">
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="heading">
<h1></h1>
</div>
</div>
</div>
<!-- /.row -->
<div class="row">
<div class="col-md-3 col-md-offset-4-5">
<a class="button" href="#button">
<div class="polygon bottom top">
Work With Us
</div>
</a>
</div>
</div>
</div>
<!-- /.containter -->
</div>
<!-- /#statement -->
You can try using a css clip-path ploygon and then add another div to get a border.
#statement .polygon .outer {
display: inline-block;
width: 290px;
height: 75px;
background: #590f20;
position: relative;
color: #F94141;
text-align: center;
font-size: 1.8em;
line-height: 2.9em;
font-weight: 400;
text-transform: uppercase;
-webkit-clip-path: polygon(30px 80px, 0px 50%, 30px 0px, 260px 0px, 290px 50%, 260px 80px);
clip-path: polygon(30px 80px, 0px 50%, 30px 0px, 260px 0px, 290px 50%, 260px 80px);
-webkit-transform: scale(0.98, 0.95);
transform: scale(0.98, 0.95);
}
#statement .polygon.border {
-webkit-clip-path: polygon(30px 80px, 0px 50%, 30px 0px, 260px 0px, 290px 50%, 260px 80px);
clip-path: polygon(30px 80px, 0px 50%, 30px 0px, 260px 0px, 290px 50%, 260px 80px);
background-color: orange;
}
<div id="statement">
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="heading">
<h1></h1>
</div>
</div>
</div>
<!-- /.row -->
<div class="row">
<div class="col-md-3 col-md-offset-4-5">
<a class="button" href="#button">
<div class="polygon border">
<span class="outer">
Work With Us
</span>
</div>
</a>
</div>
</div>
</div>
<!-- /.containter -->
</div>
<!-- /#statement -->
Whilst SVG may be an option here, I (have to) add a CSS version. Here's a quick demo, which is using a fixed height but variable width:
div {
margin: 50px;
height: 50px;
min-width: 100px;
background: lightgray;
position: relative;
display: inline-block;
border-top: 5px solid gold;
border-bottom: 5px solid gold;
padding-left: 30px;
padding-right: 30px;
line-height: 50px;
cursor:pointer;
}
div:before,
div:after {
content: "";
position: absolute;
top: -5px;
height: 37px;
width: 37px;
background: inherit;
transform: rotate(45deg);
transform-origin: top left;
}
div:before {
left: 0;
border-left: 5px solid gold;
border-bottom: 5px solid gold;
}
div:after {
left: 100%;
border-top: 5px solid gold;
border-right: 5px solid gold;
}
/*demo only*/
html {background: #222;}
<div>SOME TEXT</div>
Related
I'm trying to draw this output with css (or svg). For me, the tough part is the half-arc at the left and right side of the circle. Should I stick to pure css or is it better using images?
Any help is appreciated...
This is what I managed to make :
Here is the code :
body {
background-color: #002911 !important;
}
h3 {
color: #ffd004;
}
#actions-container {
margin-top: 30px;
}
#actions-container .action-icon {
width: 200px;
height: 200px;
background-color: rgb(255, 208, 4);
border-radius: 50%;
box-shadow: 5px -2px 6px 3px #0000004a;
/* center contents*/
display: flex;
justify-content: center;
align-items: center;
}
.right-arc {
position: relative;
display: inline-block;
font-size: 30px;
color: lightgreen;
margin: 40px;
}
.right-arc::after {
content: '';
position: absolute;
right: -150px;
top: 57px;
height: 300px;
width: 300px;
border-radius: 50% 50% 50% 50%;
border-width: 0px 1px 0px 0px;
border-style: solid;
/*border-top: outset;*/
}
/*svg {
width: 33%;
height: auto;
}*/
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet" />
<div class="container" id="actions-container">
<div class="d-flex justify-content-between">
<div class="action-icon-box text-center ">
<div class="right-arc">
</div>
<h3 class="text-center">Title</h3>
<div class="p-1 action-icon text-center mt-4">
<img class="center" src="/Content/images/lp-homepage/microphone.png" height="100" />
</div>
</div>
</div>
</div>
You could use a pseudo element with an inset box-shadow to create the fade out border on the bottom like this :
body {
background: #232323;
}
.wrap {
box-sizing: border-box;
position: relative;
width: 50%;
border: 3px solid #ffd004;
border-radius: 50%;
}
.wrap::before {
content:'';
display:block;
padding-bottom:100%;
}
.wrap::after {
content: '';
position: absolute;
bottom: -3px;
left: -3px;
right: -3px;
height: 100%;
z-index: 1;
box-shadow: inset 0px -270px 70px -100px #232323;
}
.title {
color: #ffd004;
margin: 0;
position: absolute;
top: -3px;
left: 0;
width: 100%;
text-align: center;
z-index: 2;
background: #232323;
}
.circle {
position: absolute;
top:15%;
left:15%;
width: 70%;
height: 70%;
border-radius: 50%;
background: #ffd004;
z-index: 2;
}
<div class="wrap">
<h2 class="title">Title</h2>
<div class="circle"></div>
</div>
Be aware that this will only work on plain color background. If you need to display this over a gradient or image, I highly suggest using SVG.
The aspect ratio of the circle is kept using the "padding technique" from this answer : Maintain the aspect ratio of a div with CSS
If you need transparency, you can use a mask-image with a linear-gradient.
/* based on #web-tiki's implementation */
body {
background: #232323;
}
.wrap {
box-sizing: border-box;
position: relative;
width: 50%;
padding: 60px;
}
/* the border */
.wrap::before {
content:"";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 3px solid #ffd004;
border-radius: 50%;
-webkit-mask-image: linear-gradient(transparent 10%, black 10%, transparent 80% );
mask-image: linear-gradient(transparent 10%, black 10%, transparent 80% );
}
/* the circle */
.wrap::after {
content:"";
display:block;
background: #ffd004;
padding-top: 100%;
border-radius: 50%;
box-shadow: 6px 0px 10px black;
}
.title {
color: #ffd004;
margin: 0;
position: absolute;
top: -3px;
left: 0;
right: 0;
text-align: center;
}
body:hover {
/* CSS checkerboard stolen from https://drafts.csswg.org/css-images-4/#example-2de97f53 */
background: repeating-conic-gradient(rgba(0,0,0,0.1) 0deg 25%, white 0deg 50%);
background-size: 2em 2em;
}
<div class="wrap">
<h2 class="title">Title</h2>
</div>
Try this
body {
background-color: #002911 !important;
}
h3 {
color: #ffd004;
}
#actions-container {
margin-top: 30px;
}
#actions-container .action-icon {
width: 200px;
height: 200px;
background-color: rgb(255, 208, 4);
border-radius: 50%;
box-shadow: 5px -2px 6px 3px #0000004a;
/* center contents*/
display: flex;
justify-content: center;
align-items: center;
}
.action-icon-box{
position: relative;
}
#actions-container .action-icon-box::after,#actions-container .action-icon-box::before{
position: absolute;
content: '';
width: 300px;
height:300px;
border-radius: 50%;
z-index:-1;
top:0px;
border: 2px solid;
border-color:transparent;
}
#actions-container .action-icon-box::before{
border-right-color: green;
right: -60px;
}
#actions-container .action-icon-box::after{
border-left-color: green;
left: -60px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container" id="actions-container">
<div class="d-flex justify-content-between">
<div class="action-icon-box text-center ">
<h3 class="text-center">Title</h3>
<div class="p-1 action-icon text-center mt-4">
<img class="center" src="/Content/images/lp-homepage/microphone.png" height="100" />
</div>
</div>
</div>
</div>
I wanna achieve the following result by using CSS:
So basically I want the circle to be on top of the button background but behind its border, with the button on top of the background
With the following code I am able to draw a similar button:
.container {
margin-top: 30px;
}
button {
font-size: 20px;
border: 2px solid black;
padding: 8px 20px;
position: relative;
}
.container .circle {
position: absolute;
top: -21px;
right: -21px;
width: 40px;
height: 40px;
-webkit-border-radius: 25px;
-moz-border-radius: 25px;
border-radius: 25px;
background: #4da6ff;
}
<div class="container">
<button>Test Button
<span class="circle"></span>
</button>
</div>
RESULT:
The problem here is that the circle is on top of the button, but also on top of its border.
One idea is to integrate the missing borders inside the circle
.container {
margin-top: 30px;
}
button {
font-size: 20px;
border: 2px solid black;
padding: 8px 20px;
position: relative;
}
button:before {
content: "";
position: absolute;
top: -1px;
right: -1px;
transform:translate(50%,-50%);
width: 40px;
height: 40px;
border-radius: 50%;
background:
linear-gradient(black,black) left /50% 2px,
linear-gradient(black,black) bottom/2px 50%,
#4da6ff;
background-repeat:no-repeat;
}
<div class="container">
<button>Test Button</button>
</div>
Or you can simply consider mix-blend-mode. You have to pay attention to the value used as it will depend on the combination of the colors. In this case, the suitable one is darken
.container {
margin-top: 30px;
}
button {
font-size: 20px;
border: 2px solid black;
padding: 8px 20px;
position: relative;
}
button:before {
content: "";
position: absolute;
top: -1px;
right: -1px;
transform:translate(50%,-50%);
width: 40px;
height: 40px;
border-radius: 50%;
background: #4da6ff;
mix-blend-mode:darken;
}
<div class="container">
<button>Test Button</button>
</div>
A third way more fancy with only backgrounds:
button {
font-size: 20px;
border:0 solid transparent;
border-top-width:24px;
border-right-width:24px;
padding: 8px 20px;
background:
linear-gradient(black,black) top /100% 2px,
linear-gradient(black,black) bottom/100% 2px,
linear-gradient(black,black) left /2px 100%,
linear-gradient(black,black) right /2px 100%,
radial-gradient(circle, #4da6ff 19px,transparent 20px) left bottom/200% 200% padding-box border-box,
#e2e2e6 padding-box;
background-repeat:no-repeat;
}
<div class="container">
<button>Test Button</button>
</div>
Another idea is to place the circle behind the element and cut the background:
.container {
margin-top: 30px;
position:relative;
z-index:0;
}
button {
font-size: 20px;
border: 2px solid black;
padding: 8px 20px;
position: relative;
background:radial-gradient(circle at top right,transparent 19px,#e2e2e6 20px);
}
button:before {
content: "";
position: absolute;
z-index:-1;
top: -1px;
right: -1px;
transform:translate(50%,-50%);
width: 40px;
height: 40px;
border-radius: 50%;
background:#4da6ff;
}
<div class="container">
<button>Test Button</button>
</div>
Use a pseudo element (::after) to draw the border above the circle:
.container {
margin-top: 30px;
}
button {
position: relative;
font-size: 20px;
border: none;
padding: 8px 20px;
}
button::before {
position: absolute;
top: -20px;
right: -20px;
width: 40px;
height: 40px;
border-radius: 25px;
background: #4da6ff;
content: '';
}
button::after {
position: absolute;
top: -2px;
right: -2px;
bottom: -2px;
left: -2px;
border: 2px solid black;
content: '';
}
<div class="container">
<button>Test Button</button>
</div>
I wanna achieve the following result by using CSS:
So basically I want the circle to be on top of the button background but behind its border, with the button on top of the background
With the following code I am able to draw a similar button:
.container {
margin-top: 30px;
}
button {
font-size: 20px;
border: 2px solid black;
padding: 8px 20px;
position: relative;
}
.container .circle {
position: absolute;
top: -21px;
right: -21px;
width: 40px;
height: 40px;
-webkit-border-radius: 25px;
-moz-border-radius: 25px;
border-radius: 25px;
background: #4da6ff;
}
<div class="container">
<button>Test Button
<span class="circle"></span>
</button>
</div>
RESULT:
The problem here is that the circle is on top of the button, but also on top of its border.
One idea is to integrate the missing borders inside the circle
.container {
margin-top: 30px;
}
button {
font-size: 20px;
border: 2px solid black;
padding: 8px 20px;
position: relative;
}
button:before {
content: "";
position: absolute;
top: -1px;
right: -1px;
transform:translate(50%,-50%);
width: 40px;
height: 40px;
border-radius: 50%;
background:
linear-gradient(black,black) left /50% 2px,
linear-gradient(black,black) bottom/2px 50%,
#4da6ff;
background-repeat:no-repeat;
}
<div class="container">
<button>Test Button</button>
</div>
Or you can simply consider mix-blend-mode. You have to pay attention to the value used as it will depend on the combination of the colors. In this case, the suitable one is darken
.container {
margin-top: 30px;
}
button {
font-size: 20px;
border: 2px solid black;
padding: 8px 20px;
position: relative;
}
button:before {
content: "";
position: absolute;
top: -1px;
right: -1px;
transform:translate(50%,-50%);
width: 40px;
height: 40px;
border-radius: 50%;
background: #4da6ff;
mix-blend-mode:darken;
}
<div class="container">
<button>Test Button</button>
</div>
A third way more fancy with only backgrounds:
button {
font-size: 20px;
border:0 solid transparent;
border-top-width:24px;
border-right-width:24px;
padding: 8px 20px;
background:
linear-gradient(black,black) top /100% 2px,
linear-gradient(black,black) bottom/100% 2px,
linear-gradient(black,black) left /2px 100%,
linear-gradient(black,black) right /2px 100%,
radial-gradient(circle, #4da6ff 19px,transparent 20px) left bottom/200% 200% padding-box border-box,
#e2e2e6 padding-box;
background-repeat:no-repeat;
}
<div class="container">
<button>Test Button</button>
</div>
Another idea is to place the circle behind the element and cut the background:
.container {
margin-top: 30px;
position:relative;
z-index:0;
}
button {
font-size: 20px;
border: 2px solid black;
padding: 8px 20px;
position: relative;
background:radial-gradient(circle at top right,transparent 19px,#e2e2e6 20px);
}
button:before {
content: "";
position: absolute;
z-index:-1;
top: -1px;
right: -1px;
transform:translate(50%,-50%);
width: 40px;
height: 40px;
border-radius: 50%;
background:#4da6ff;
}
<div class="container">
<button>Test Button</button>
</div>
Use a pseudo element (::after) to draw the border above the circle:
.container {
margin-top: 30px;
}
button {
position: relative;
font-size: 20px;
border: none;
padding: 8px 20px;
}
button::before {
position: absolute;
top: -20px;
right: -20px;
width: 40px;
height: 40px;
border-radius: 25px;
background: #4da6ff;
content: '';
}
button::after {
position: absolute;
top: -2px;
right: -2px;
bottom: -2px;
left: -2px;
border: 2px solid black;
content: '';
}
<div class="container">
<button>Test Button</button>
</div>
How can I add the border to this geometric figure created in css?
I tried this, but it isn't working. the border looks like a square...
https://jsfiddle.net/asngxe77/
HTML:
<div align="center" class="orpos">
<div class="orstyle">
<div class="or">
</div>
</div>
</div>
CSS:
.orpos{
position: relative;
height: 100px;
width: 100px;
top: 50%;
margin-top: -50px;
left: 50%;
margin-left: -50px;
}
.orstyle{
border: solid 1px #505246;
}
.or {
width: 0;
height: 0;
border: 50px solid transparent;
border-bottom-color: #272822;
position: relative;
top: -50px;
}
.or:after {
content: '';
position: absolute;
left: -50px;
top: 50px;
width: 0;
height: 0;
border: 50px solid transparent;
border-top-color: #272822;
}
you could still use border, then transform and a gradient:
.orpos {
position: relative;
height: 100px;
width: 100px;
margin: auto;
overflow: hidden;
}
.orstyle {
border: solid 4px #505246;
/* set a background-color and draw the last border in bg */
background: linear-gradient(135deg, #505246 38%, transparent 38%) gold;
width: 60%;
height: 60%;
transform: rotate(45deg);
margin-top: -20%;
}
.or {
transform: rotate(-45deg);
margin-top: 38.5%;
/* to stay away from top border area */
}
/* demo purpose */
.orpos {
display: inline-block;
vertical-align: top;
}
.border1 {
border-width: 1px;
}
.border10 {
border-width: 10px;
}
.border5 {
border-width: 5px;
}
<div align="center" class="orpos">
<div class="orstyle border1">
<div class="or">
OR
<!-- was text meant to be here ? -->
</div>
</div>
</div>
<div align="center" class="orpos">
<div class="orstyle">
<div class="or">
OR
<!-- was text meant to be here ? -->
</div>
</div>
</div>
<div align="center" class="orpos">
<div class="orstyle border10">
<div class="or">
OR
<!-- was text meant to be here ? -->
</div>
</div>
</div>
<div align="center" class="orpos">
<div class="orstyle border5">
<div class="or">
OR
<!-- was text meant to be here ? -->
</div>
</div>
</div>
from code demo on css-tricks website for the diamond square :
#diamond {
margin: 1em;
width: 0;
height: 0;
border: 50px solid transparent;
border-bottom-color: red;
position: relative;
top: -50px;
}
#diamond:after {
content: '';
position: absolute;
left: -50px;
top: 50px;
width: 0;
height: 0;
border: 50px solid transparent;
border-top-color: red;
}
#diamond:before {
content: '';
position: absolute;
height: 80px;
width: 80px;
background: gray;
transform: rotate(45deg);
left: -40px;
top: 10px;
z-index: -1;
}
#diamond:hover:before {
box-shadow: inset 0 0 0 3px green, 0 0 0 3px;
/* more borders border ?*/
border-radius: 4px;
background:white
}
<p>Hover the diamond and see some extra css effects to draw a three color rounded borders</p>
<div id="diamond"></div>
I need to align the corner ribbon to my image. here's what I managed to do:
<div class="row">
<div class="col-sm-6">
<a href="http://website.com">
<img src="/images/web1.jpg"><div class="ribbon"><span>Featured</span></div></img>
</a><br><br>
<hr>
</div>
<div class="col-sm-6">
<a href="http://website.com">
<img src="/images/web2.jpg"><div class="ribbon"><span>Featured</span></div></img>
</a><br><br>
<hr>
</div>
</div>
the css
.ribbon {
position: absolute;
right: 62px; top: -5px;
z-index: 1;
overflow: hidden;
width: 75px;
height: 75px;
text-align: right;
}
.ribbon span {
font-size: 10px;
color: #fff;
text-transform: uppercase;
text-align: center;
font-weight: bold; line-height: 20px;
transform: rotate(45deg);
width: 100px; display: block;
background: #79A70A;
background: linear-gradient(#9BC90D 0%, #79A70A 100%);
box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);
position: absolute;
top: 19px; right: -21px;
}
.ribbon span::before {
content: '';
position: absolute;
left: 0px; top: 100%;
z-index: -1;
border-left: 3px solid #79A70A;
border-right: 3px solid transparent;
border-bottom: 3px solid transparent;
border-top: 3px solid #79A70A;
}
.ribbon span::after {
content: '';
position: absolute;
right: 0%; top: 100%;
z-index: -1;
border-right: 3px solid #79A70A;
border-left: 3px solid transparent;
border-bottom: 3px solid transparent;
border-top: 3px solid #79A70A;
}
the ribbon works fine if I put a fixed height and width, but how do I make the ribbon stick to the right corner of the image? Thanks
EDITED
<div class="row">
<div class="col-sm-6">
<div class="wrappersa"> <a href="http://website.com">
<img class="img-responsive" src="/images/web3.jpg" />
<div class="ribbon-wrapper-green">
<div class="ribbon-green">New</div>
</div>
</a><br><br>
<p><strong>Website</strong<br>This is a website</p><br><hr>
</div>
</div>
<div class="col-sm-6">
</div>
</div>
</div>
CSS
.wrappersa {
margin: 20px auto;
width: 450px;
height: 430px;
position: relative;
}
.ribbon-wrapper-green {
width: 85px;
height: 88px;
overflow: hidden;
position: absolute;
top: -3px;
right: -3px;
}
.ribbon-green {
font-size: 10px;
color: #fff;
text-transform: uppercase;
text-align: center;
font-weight: bold;
line-height: 20px;
transform: rotate(45deg);
width: 100px;
display: block;
background: #79A70A;
background: linear-gradient(#9BC90D 0%, #79A70A 100%);
box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);
position: absolute;
top: 19px;
right: -21px;
}
.ribbon-green:before, .ribbon-green:after {
content:'';
position: absolute;
left: 0px;
top: 100%;
z-index: -1;
border-left: 3px solid #79A70A;
border-right: 3px solid transparent;
border-bottom: 3px solid transparent;
border-top: 3px solid #79A70A;
}
#media (max-width : 992px) {
.wrappersa {
margin: 20px auto;
width: 100%;
height: auto;
position: relative;
}
}
This might help but as you said, the ribbon doesn't truly take into account if the image size is dynamically changed so all image sizes have to be fixed and the same.
Updated with bottom text caption.
figure {
display: inline-block;
}
figure img {
vertical-align: top;
}
figure figcaption {
padding: 5px 0;
text-align: center;
background: #9BC90D;
}
.wrapper a {
color: #fff;
}
/*****************/
.wrapper {
margin: 20px auto;
width: 450px;
height: 430px;
position: relative;
}
.ribbon-wrapper-green {
width: 85px;
height: 88px;
overflow: hidden;
position: absolute;
top: -3px;
right: -3px;
}
.ribbon-green {
font-size: 10px;
color: #fff;
text-transform: uppercase;
text-align: center;
font-weight: bold;
line-height: 20px;
transform: rotate(45deg);
width: 100px;
display: block;
background: #79A70A;
background: linear-gradient(#9BC90D 0%, #79A70A 100%);
box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);
position: absolute;
top: 19px;
right: -21px;
}
.ribbon-green:before,
.ribbon-green:after {
content: '';
position: absolute;
left: 0px;
top: 100%;
z-index: -1;
border-left: 3px solid #79A70A;
border-right: 3px solid transparent;
border-bottom: 3px solid transparent;
border-top: 3px solid #79A70A;
}
#media (max-width: 992px) {
.wrapper {
margin: 20px auto;
width: 100%;
height: auto;
position: relative;
}
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class="wrapper">
<a href="https://something.io">
<figure>
<img class="img-responsive" src="http://placehold.it/950x500/1c1c1c/fff/?text=Image" />
<figcaption><strong>Website</strong>
<br>This is a website
</figcaption>
</figure>
<div class="ribbon-wrapper-green">
<div class="ribbon-green">New</div>
</div>
</a>
<hr>
</div>
</div>
<div class="col-sm-6">
<div class="wrapper">
<a href="https://something.io">
<figure>
<img class="img-responsive" src="http://placehold.it/950x500/1c1c1c/fff/?text=Image" />
<figcaption><strong>Website</strong>
<br>This is a website
</figcaption>
</figure>
<div class="ribbon-wrapper-green">
<div class="ribbon-green">New</div>
</div>
</a>
<hr>
</div>
</div>
</div>
</div>