CSS3 Diagonal Border Line - css

I'm trying to make a box that the bottom right border has to be a diagonal line, like in the image below:
Has anyone an idea of how can I do it without using a background image?

Example 1 - link
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
padding: 20px 60px;
}
.btn,
.btn span{
width: 300px;
height: 100px;
display: inline-block;
position: relative;
color: #e74c3c;
font: bold 18px/100px'segoe ui';
text-transform: uppercase;
text-align: center;
text-decoration: none;
overflow: hidden;
padding: 2px;
}
.btn span {
width: 100%;
height: 100%;
}
.btn:before,
.btn span:before{
content:'';
position: absolute; right: -500%;
width: 1100%;
height: 1100%;
background: #c00;
z-index: -1;
}
.btn:hover span{
color: #000;
}
.btn:hover:before{
background: #000;
}
/* ----- btn-left-top ----- */
.btn-left-top:before,
.btn-left-top span:before{
top: 20px;
transform-origin: 46% top;
transform: rotate(-45deg);
}
.btn-left-top span:before{
top: 19px;
background: #fff;
}
/* ----- btn-left-bottom ----- */
.btn-left-bottom:before,
.btn-left-bottom span:before{
bottom: 20px;
transform-origin: 46% bottom;
transform: rotate(45deg);
}
.btn-left-bottom span:before{
bottom: 19px;
background: #fff;
}
/* ----- btn-right-top ----- */
.btn-right-top:before,
.btn-right-top span:before{
top: 20px;
transform-origin: 54% top;
transform: rotate(45deg);
}
.btn-right-top span:before{
top: 19px;
background: #fff;
}
/* ----- btn-right-bottom ----- */
.btn-right-bottom:before,
.btn-right-bottom span:before{
bottom: 20px;
transform-origin: 54% bottom;
transform: rotate(-45deg);
}
.btn-right-bottom span:before{
bottom: 19px;
background: #fff;
}
<a href="#" class="btn btn-left-top">
<span>btn-left-top</span>
</a>
<a href="#" class="btn btn-right-top">
<span>btn-right-top</span>
</a>
<a href="#" class="btn btn-right-bottom">
<span>btn-right-bottom</span>
</a>
<a href="#" class="btn btn-left-bottom">
<span>btn-left-bottom</span>
</a>
Example 2 - link
* {
margin: 0;
padding: 0;
}
body {
padding: 20px 60px;
}
.btn{
width: 300px;
height: 100px;
display: inline-block;
position: relative;
border: 4px solid #e74c3c;
color: #e74c3c;
font: bold 18px/100px 'segoe ui';
text-transform: uppercase;
text-align: center;
text-decoration: none;
}
.btn > span:before {
content: '';
position: absolute; bottom: 12px; right: 9px;
width: 66px;
height: 66px;
transform: rotate(45deg);
z-index: 1;
border-right: 4px solid #e74c3c;
}
.btn:before,
.btn:after{
content: '';
position: absolute; bottom: -4px; right: -4px;
}
.btn:before{
width: 47px;
height: 0;
border-bottom: 4px solid #fff;
}
.btn:after{
width: 0;
height: 47px;
border-right: 4px solid #fff;
}
.btn:hover{
border: 4px solid #4169E1;
color: #4169E1;
}
.btn:hover > span:before{
border-right: 4px solid #4169E1;
}
<a href="#" class="btn">
<span>test</span>
</a>
Fiddle

Check this out it may help you click
HTML
<div class="blockHead">
<span class="blocktext">
ABC Team
</span>
</div>
CSS
.blockHead:after {
color:#4D81BF;
border-left: 20px solid;
border-top: 20px solid;
border-bottom: 20px solid transparent;
display: inline-block;
content: '';
position: absolute;
right: -20px;
}
.blockHead {
background-color:#4D81BF;
/*width: 150px; */
height: 40px;
display: inline-block;
position: relative;
}
.blocktext{
color:white;
font-weight:bold;
padding:0px 40px 0px 10px;
font-family:Arial;
font-size:11;
line-height:2.5;
}

Related

Css 3 transition between arrows

I have a simple arrow which is like this:
>
and on hover I want it to expand to look like this:
->
of course without the gap between them.
This has to be a transition + animation between them to be smooth. Here's what I have so far
My Work
body,
html {
margin: 0;
padding: 0;
max-width: 100%;
max-height: 100%;
overflow-x: hidden;
position: relative;
background-color: black;
}
.button {
display: inline-block;
vertical-align: middle;
border-radius: 50%;
margin: 6em 0 0;
padding: 0;
text-align: center;
}
.left {
display: inline-block;
width: 3em;
height: 3em;
border: 0.5em solid #333;
border-radius: 50%;
margin-right: 1.5em;
}
.left:after {
content: '';
display: inline-block;
margin-top: 0.90em;
margin-left: 0.6em;
width: 0.8em;
height: 0.8em;
border-top: 0.5em solid #333;
border-right: 0.5em solid #333;
-moz-transform: rotate(-135deg);
-webkit-transform: rotate(-135deg);
transform: rotate(-135deg);
}
.right {
color: white;
display: inline-block;
width: 3em;
height: 3em;
border: 0.5em solid #333;
border-radius: 50%;
margin-left: 1.5em;
}
.right:after {
content: '';
display: inline-block;
margin-top: 0.90em;
margin-left: -0.6em;
width: 0.8em;
height: 0.8em;
border-top: 0.5em solid #333;
border-right: 0.5em solid #333;
-moz-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.right:hover {
content: '';
display: inline-block;
margin-top: 0.90em;
margin-left: -0.6em;
width: 2em;
height: 2em;
border-top: 0.5em solid #333;
border-right: 0.5em solid #333;
-moz-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
<body>
<div class="button">
<span class="left"></span>
</div>
<div class="button">
<span class="right"></span>
</div>
</body>
Any ideas how can I achieve smooth transition and animation from between those 2 arrows?
Well, hope this help. I did it by insert another pseudo class onhover of your right class.
.right:hover:before {
content: '';
height: 0.5em;
width: 1.4em;
background-color: #333333;
display: inline-block;
transform: translate(6px,-6px);
max-width: 2em;
transition: 0.5s all ease-in-out;
}
.right:before {
content: '';
transition: 0.5s all ease-in-out;
max-width: 0em;
}
If you insert this, you must remove .right:hover. Check this pen.

apply 1px borders to CSS speech bubbles?

How can we apply 1px borders to these speech bubbles?
This similar SO post did not work here, as we use a different approach to generate the speech bubbles
.chat-messages {
width: calc(100%);
padding-bottom: 5px;
background-color: #f3f3f4;
}
.sb-time {
font-size: 10pt;
font-weight: 400;
margin: 7px -5px 0px 10px;
float: right;
}
.sb {
font-size: 13pt;
font-weight: 500;
border-radius: 6px;
display: block;
padding: 10px 15px 5px 15px;
position: relative;
vertical-align: top;
clear: both;
}
.sb::before {
content: "\00a0";
display: block;
height: 15px;
position: absolute;
top: 10px;
-moz-transform: rotate(30deg) skew(-35deg);
-ms-transform: rotate(30deg) skew(-35deg);
-o-transform: rotate(30deg) skew(-35deg);
-webkit-transform: rotate(30deg) skew(-35deg);
transform: rotate(30deg) skew(-35deg);
width: 15px;
}
.sb-0 {
background-color: #ffffff;
float: left;
margin: 5px 17% 5px 20px;
}
.sb-0::before {
background-color: #ffffff;
left: -8px;
}
.sb-1 {
background-color: #EEFFDD;
float: right;
margin: 5px 20px 5px 17%;
}
.sb-1::before {
background-color: #EEFFDD;
right: -8px;
}
<div class="chat-messages" style="max-height: 472px; overflow: hidden; width: auto; height: 472px;">
<div class="sb sb-text sb-0">Hi
<div class="sb-time">09:16</div>
</div>
<div class="sb sb-text sb-0">Fine. Thnks
<div class="sb-time">09:19</div>
</div>
<div class="sb sb-text sb-1">What subject u are talking about ?
<div class="sb-time">09:19</div>
</div>
</div>
Have a look at this Jsfiddle.
These are the changes I made:
.sb {
border: 1px solid #000;
}
.sb::before {
height: 12px;
top: 12px;
border-left: 1px solid #000;
border-bottom: 1px solid #000;
}
.sb-0 {
background-color: #ffffff;
float: left;
margin: 5px 17% 5px 20px;
}
.sb-0::before {
left: -9px;
}
EDIT
Updated Jsfiddle to contain the bubble on the right side also.
UPDATE
Prefixes for transform 2D are no longer needed, see CanIUse
.sb {
....
border: 1px solid red;
}
.sb-0::before {
....
border-left: 1px solid red;
border-bottom: 1px solid red;
transform: rotate(35deg) skew(-25deg) translate(-1px, 0);
width: 16px;
height: 14px;
}
.sb-1::before {
....
border-right: 1px solid red;
border-top: 1px solid red;
transform: rotate(35deg) skew(-25deg) translate(1px, 0);
width: 16px;
height: 14px;
}
SNIPPET
body {
background: #000;
}
.chat-messages {
width: calc(100%);
padding-bottom: 5px;
background-color: #666;
}
.sb-time {
font-size: 10pt;
font-weight: 400;
margin: 7px -5px 0px 10px;
float: right;
}
.sb {
font-size: 13pt;
font-weight: 500;
border-radius: 6px;
display: block;
padding: 10px 15px 5px 15px;
position: relative;
vertical-align: top;
clear: both;
border: 1px solid red;
}
.sb-0:before {
content: "\00a0";
display: block;
position: absolute;
top: 10px;
transform: rotate(25deg) skew(-35deg) translate(-1px, 0);
width: 16px;
height: 14px;
border-left: 1px solid red;
border-bottom: 1px solid red;
}
.sb-1:before {
content: "\00a0";
display: block;
position: absolute;
top: 10px;
transform: rotate(25deg) skew(-35deg) translate(1px, 0);
width: 16px;
height: 14px;
border-right: 1px solid red;
border-top: 1px solid red;
}
.sb-0 {
background-color: #ffffff;
float: left;
margin: 5px 17% 5px 20px;
}
.sb-0::before {
background-color: #ffffff;
left: -8px;
}
.sb-1 {
background-color: #EEFFDD;
float: right;
margin: 5px 20px 5px 17%;
}
.sb-1::before {
background-color: #EEFFDD;
right: -8px;
}
<div class="chat-messages" style="max-height: 472px; overflow: hidden; width: auto; height: 472px;">
<div class="sb sb-text sb-0">Hi
<div class="sb-time">09:16</div>
</div>
<div class="sb sb-text sb-0">Fine. Thnks
<div class="sb-time">09:19</div>
</div>
<div class="sb sb-text sb-1">What subject u are talking about ?
<div class="sb-time">09:19</div>
</div>
</div>

How to do this kind of Button in CSS?

I've been searching the Internet for a while and found nothing, so I'm turning to you guys.
I was wondering how you can do a button like this with CSS (On/Off button example):
I already tried something like this :
HTML :
<a class="button_tooltip" href="#">On</a>
<a class="button_tooltip" href="#">Off</a>
CSS:
a {
color: #76daff;
display: inline-block;
padding: 8px 16px;
position: relative;
text-decoration: none;
}
a {
color: #76daff;
}
a.button_tooltip {
background: #ccc none repeat scroll 0 0;
color: black;
}
a.button_tooltip::after {
border-top-color: #cccccc;
}
a.button_tooltip::after {
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-top: 8px solid #ccc;
content: "";
margin-left: -8px;
}
a.button_tooltip {
background: #cccccc none repeat scroll 0 0;
color: #000000;
}
a.button_tooltip::after {
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-top: 8px solid #ccc;
content: "";
}
a.button_tooltip::after {
border-top-color: #cccccc;
}
But only gave me the square without the little triangle underneath.
This is easily possible with 2 elements and using a pseudo element to get the arrow bit underneath to show.
It doesn't take a great deal of HTML/CSS to complete and can easily be changed to work as an input or as an <a> tag. Whatever your requirements are.
$(document).ready(function() {
$('.btn').click(function() {
$('.btn').toggleClass('active');
});
});
.container {
width: 200px;
height: 100px;
}
.btn {
width: 100px;
height: 100px;
box-sizing: border-box;
border: 1px solid blue;
float: left;
cursor: pointer;
}
.active {
background: blue;
position: relative;
}
.active:before {
content: '';
position: absolute;
width: 50px;
height: 50px;
transform: rotate(45deg);
bottom: -10px;
left: 25px;
background: blue;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="container">
<div class="btn"></div>
<div class="btn active"></div>
</div>
$(document).ready(function() {
$('.toggle-btn button').click(function() {
$(this).parent('.toggle-btn').children('button').removeClass('active');
$(this).addClass('active');
});
});
.toggle-btn {
border: 1px solid #4c8cca;
display: inline-block;
line-height: 1;
width: 100px;
}
button {
line-height: 1;
float: left;
height: 30px;
background: none;
background-color: transparent;
border: none;
padding: 0;
position: relative;
outline: 0;
width: 50%;
cursor: pointer;
}
button:hover {
background-color: #EEE;
}
button.active {
background: #4c8cca;
background-color: #4c8cca;
color: #FFF;
}
button.active:after {
content: '';
position: absolute;
width: 10px;
height: 10px;
top: 25px;
transform: rotate(45deg);
background-color: #4c8cca;
left: 50%;
margin-left: -4px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="toggle-btn">
<button>Yes</button>
<button class="active">No</button>
</div>
Here you go:
http://jsfiddle.net/es_kaija/negzqemp/
<div class="switch off">
<div class="toggle"></div>
<span class="on">ON</span>
<span class="off">OFF</span>
</div>
<style>
.switch {
position: relative;
display: inline-block;
font-size: 1em;
font-weight: bold;
color: #ccc;
text-shadow: 0px 1px 1px rgba(255,255,255,0.8);
height: 18px;
padding: 6px 6px 5px 6px;
border: 1px solid #ccc;
border: 1px solid rgba(0,0,0,0.2);
border-radius: 4px;
background: #ececec;
box-shadow: 0px 0px 4px rgba(0,0,0,0.1), inset 0px 1px 3px 0px rgba(0,0,0,0.1);
cursor: pointer;
}
.switch span { display: inline-block; width: 35px; }
.switch span.On { color: #33d2da; }
.switch .toggle {
position: absolute;
top: 1px;
width: 37px;
height: 25px;
border: 1px solid #ccc;
border: 1px solid rgba(0,0,0,0.3);
border-radius: 4px;
background: #fff;
background: -moz-linear-gradient(top, #ececec 0%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ececec), color-stop(100%,#ffffff));
background: -webkit-linear-gradient(top, #ececec 0%,#ffffff 100%);
background: -o-linear-gradient(top, #ececec 0%,#ffffff 100%);
background: -ms-linear-gradient(top, #ececec 0%,#ffffff 100%);
background: linear-gradient(top, #ececec 0%,#ffffff 100%);
box-shadow: inset 0px 1px 0px 0px rgba(255,255,255,0.5);
z-index: 999;
-webkit-transition: all 0.15s ease-in-out;
-moz-transition: all 0.15s ease-in-out;
-o-transition: all 0.15s ease-in-out;
-ms-transition: all 0.15s ease-in-out;
}
.switch.on .toggle { left: 2%; }
.switch.off .toggle { left: 54%; }
</style>
<script>
$(document).ready(function() {
// Switch toggle
$('.switch').click(function() {
$(this).toggleClass('on').toggleClass('off');
});
});
</script>
You can do that using css itself. Here is the example - https://jsfiddle.net/p653bpbe/
html
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" checked>
<label class="onoffswitch-label" for="myonoffswitch">
<span class="onoffswitch-inner"></span>
<span class="onoffswitch-switch"></span>
</label>
</div>
css
.onoffswitch {
position: relative; width: 90px;
-webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
}
.onoffswitch-checkbox {
display: none;
}
.onoffswitch-label {
display: block; overflow: hidden; cursor: pointer;
border: 1px solid #2E8DEF; border-radius: 0px;
}
.onoffswitch-inner {
display: block; width: 200%; margin-left: -100%;
transition: margin 0.3s ease-in 0s;
}
.onoffswitch-inner:before, .onoffswitch-inner:after {
display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 26px;
font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
box-sizing: border-box;
border: 2px solid transparent;
background-clip: padding-box;
}
.onoffswitch-inner:before {
content: "";
padding-left: 10px;
background-color: #FFFFFF; color: #FFFFFF;
}
.onoffswitch-inner:after {
content: "";
padding-right: 10px;
background-color: #FFFFFF; color: #333333;
text-align: right;
}
.onoffswitch-switch {
display: block; width: 45px; margin: 0px;
background: #2E8DEF;
position: absolute; top: 0; bottom: 0;
transition: all 0.3s ease-in 0s;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
margin-left: 0;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
right: 0px;
}
Button
a { font-size: 0; line-height: 0; text-indent: -4000px; background: #fff; border: 1px solid #007bff; width: 30px; height: 30px; display: block; position: relative; }
a:after { position: absolute; top: -1px; left: 30px; width: 30px; height: 30px; content: ''; display: block; background: #007bff; border: 1px solid #007bff; }
a:before { content: ''; display: block; width: 0; height: 0; border-style: solid; border-width: 10px 10px 0 10px; border-color: #007bff transparent transparent transparent; position: absolute; bottom: -10px; right: -25px; }

Spaceship menu with CSS

Basically, the image below summarizes my question.
Is there any elegant solution to make it work? I've tried to use rotate, skew and perspective, but didn't work for me.
Note: the background needs to be transparent.
My code for you. :)
* { box-sizing: border-box; }
body { font: normal 16px sans-serif; }
.spaceship {
height: 430px;
position: relative;
width: 140px;
}
.spaceship::before {
background: #006dd9;
border-radius: 100%;
content: '';
height: 70px;
position: absolute;
width: 140px;
z-index: 1;
}
.abduction {
background: #0f0;
height: 370px;
left: 20px;
padding-top: 10px;
position: absolute;
top: 60px;
width: 100px;
}
.abduction a {
color: #fff;
display: block;
height: 60px;
padding-top: 25px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
transition: background 500ms;
}
.abduction a:nth-child(even) { background: #00d900; }
.abduction a:hover { background: #008c00; }
<div class="spaceship">
<div class="abduction">
Button 1
Button 2
Button 3
Button 4
Button 5
Button 6
</div>
</div>
Here's what I changed your css to make it look like your picture and do the correct hover effect:
* { box-sizing: border-box; }
body { font: normal 16px sans-serif; }
.spaceship {
height: 430px;
position: relative;
width: 140px;
}
.spaceship::before {
background: #006dd9;
border-radius: 100%;
content: '';
height: 70px;
position: absolute;
width: 140px;
z-index: 1;
}
.abduction {
height: 370px;
left: 20px;
padding-top: 5px;
position: absolute;
top: 60px;
width: 100px;
}
.abduction a {
color: #fff;
display: block;
height: 65px;
margin: 0 auto;
padding: 0;
border-bottom: 65px solid #0f0;
border-left: 3px solid transparent;
border-right: 3px solid transparent;
line-height: 5;
font-size: 12px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
transition: border-bottom-color 500ms;
}
.abduction a:nth-child(5){
width: 94px;
}
.abduction a:nth-child(4){
width: 88px;
}
.abduction a:nth-child(3){
width: 82px;
}
.abduction a:nth-child(2){
width: 76px;
}
.abduction a:nth-child(1){
width: 70px;
}
.abduction a:nth-child(even) { border-bottom-color: #00d900; }
.abduction a:hover { border-bottom-color: #008c00; }
<div class="spaceship">
<div class="abduction">
Button 1
Button 2
Button 3
Button 4
Button 5
Button 6
</div>
</div>
So basically to create a 65px high trapezoid with borders (colored #0f0) you'd do this:
border-bottom: 65px solid #0f0;
border-left: 3px solid transparent;
border-right: 3px solid transparent;
The width of the last element is 100px. So since the left border width + the right border width = 6px and 100px - 6px = 94px, the second to last element will have a width of 94px to match the top of the last element. You subtract the side border sum from the previous elements width to get the current element width.
Also the transition property needs to be changed to border-bottom-color instead of background because border-bottom-color is what sets the color of the trapezoid.
* { box-sizing: border-box; }
body { font: normal 16px sans-serif; }
.spaceship {
height: 430px;
position: relative;
width: 140px;
}
.spaceship::before {
background: #006dd9;
border-radius: 100%;
content: '';
height: 70px;
position: absolute;
width: 140px;
z-index: 1;
}
.abduction {
height: 370px;
left: 15px;
padding-top: 10px;
position: absolute;
top: 50px;
width: 110px;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 400px solid #0f0;
}
.abduction a {
color: #fff;
display: block;
height: 60px;
padding-top: 25px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
transition: background 500ms;
}
.abduction a:nth-child(even) { background: #00d900; }
.abduction a:hover { background: #008c00; }
<div class="spaceship">
<div class="abduction">
Button 1
Button 2
Button 3
Button 4
Button 5
Button 6
</div>
</div>
I'm pretty sure you need javascript for that.
jQuery(document).ready(function(){
var buttons = [{name:'button'},{name:'button'},{name:'button'},{name:'button'},{name:'button'},{name:'button'}];
var b;
for(b in buttons){
var rev = buttons.length - (b*10);
var btn = jQuery(''+ buttons[b].name + ' ' + b +'').css({left:rev/2, width:100 - rev} );
jQuery('.abduction').append(btn);
}
});
* { box-sizing: border-box; }
body { font: normal 16px sans-serif; }
.spaceship {
height: 430px;
position: relative;
width: 140px;
}
.spaceship::before {
background: #006dd9;
border-radius: 100%;
content: '';
height: 70px;
position: absolute;
width: 140px;
z-index: 1;
}
.abduction {
height: 370px;
left: 20px;
padding-top: 10px;
position: absolute;
top: 60px;
width: 100px;
}
.abduction a {
display:block;
position:relative;
color: #fff;
display: block;
height: 60px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
transition: background 500ms;
border-bottom:80px solid #0f0;
border-left:5px solid transparent;
border-right:5px solid transparent;
}
.abduction a:nth-child(even) { border-bottom: 80px solid #00d900; }
.abduction a:hover { border-bottom: 80px solid #008c00; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="spaceship">
<div class="abduction">
</div>
</div>

How can I insert a small rectangle inside the rectangle?

.
Here is my link http://jsfiddle.net/ashadee/xhaLqvav/.
Html code
Eat your lunch<br>
CSS
a{
font-size: 1.2em;
white-space: normal;
}
a.rectangle
{
width: 70%;
height: 5%;
border: 1px solid black;
padding: 5%;
margin-top: 0%;
background-color: #FAFAFA;
opacity: 0.4;
display: block;
text-decoration: none;
text-align: center;
font-family: Comic Sans MS;
box-shadow: 10px 10px 5px #888888;
}
how will I make the design like the one in the image? Should I use canvas property.
demo - http://jsfiddle.net/victor_007/xhaLqvav/2/
use pseudo element :after and :before for styling right box and rounded
a {
font-size: 1.2em;
white-space: normal;
}
a.rectangle {
width: 70%;
height: 5%;
border: 2px solid black;
padding: 5%;
margin-top: 0%;
background-color: #FAFAFA;
opacity: 0.4;
display: block;
text-decoration: none;
text-align: center;
font-size: 32px;
font-family: Comic Sans MS;
box-shadow: 10px 10px 5px #888888;
position: relative;
}
a:before {
content: '';
border-right: 2px solid black;
height: 100%;
position: absolute;
background: orange;
width: 50px;
top: 0;
bottom: 0;
left: 0;
}
a:after {
content: '';
width: 30px;
height: 30px;
border-radius: 50%;
background: black;
position: absolute;
left: 35px;
top: 50%;
transform: translatey(-50%)
}
Stanford
<br>

Resources