Skip to content

Instantly share code, notes, and snippets.

@faruk09
Created February 25, 2020 10:38
Show Gist options
  • Save faruk09/80161ca0b8b1a63d1c4ad69743cd6a2e to your computer and use it in GitHub Desktop.
Save faruk09/80161ca0b8b1a63d1c4ad69743cd6a2e to your computer and use it in GitHub Desktop.
===============HTML==========================
<div class="item">
<div class="border"></div>
<div class="content">
<h3>Extreme Instagram <br> Looks Books</h3>
</div>
</div>
==============CSS================
body {
background: url("https://www.jjcreative.com/lakeandpen/images/home/galllery1.jpg");
background-size: cover;
background-repeat: no-repeat;
}
.item {
position: relative;
width: 400px;
height: 100px;
}
.border {
position: absolute;
width: 60px;
height: 100px;
border: 4px solid #fff;
border-right: 0;
}
.border:before {
content: "";
position: absolute;
right: 0;
width: 4px;
height: 20px;
background: #fff;
}
.border:after {
content: "";
position: absolute;
right: 0;
bottom: 0;
width: 4px;
height: 20px;
background: #fff;
}
.content {
position: absolute;
left: 30px;
top: 50%;
transform: translateY(-50%);
}
.content h3 {
margin: 0;
padding: 10px;
color: #fff;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.item {
position: relative;
width: 400px;
height: 100px;
}
.border {
position: absolute;
width: 60px;
height: 100px;
border: 4px solid red;
}
.content {
background: #fff;
position: absolute;
left: 30px;
top: 50%;
transform: translateY(-50%);
}
.content h3 {
margin: 0;
padding: 10px;
}
</style>
</head>
<body>
<div class="item">
<div class="border"></div>
<div class="content">
<h3>Extreme Instagram <br> Looks Books</h3>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment