Skip to content

Instantly share code, notes, and snippets.

@DivaVocals
Created February 28, 2015 21:42
Show Gist options
  • Save DivaVocals/23fb29d894fef4d745a4 to your computer and use it in GitHub Desktop.
Save DivaVocals/23fb29d894fef4d745a4 to your computer and use it in GitHub Desktop.
Declare a size/partial border
Method 1: http://dabblet.com/gist/e5a78f2d4bf50b6be4d3
CSS:
div {
text-align:center;
}
h1 {
position: relative;
display: inline-block;
color: #818488;
font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
}
h1:after {
content: '';
width: 75%;
left: 12.5%;
height: 1px;
background: #b0b0b0;
position: absolute;
bottom: -1px;
}
HTML:
<div><h1>Something</h1></div>
Method 2:
http://dabblet.com/gist/1601054
CSS:
div {width:350px; height:100px; background:lightgray; position:relative; margin:20px;}
div:after{content:''; width:60px; height:4px; background:gray; position:absolute; bottom:-4px;}
HTML:
<div></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment