<div class="container">
<div id="water">
<h1 id="water-txt">water</h1>
</div>
<p id="sub-text">Only half of people in Africa<br>have safe water.</p>
</div>
@import "compass/css3";
html {
font-family: Arial, sans-serif;
background: #231F20;
color: #FFFFFF;
}
.container {
height: 200px;
width: 700px;
margin: 5em auto;
position: relative;
}
#water {
overflow: hidden; // Added this for FF because adjusting font-size was breaking the box! WTF!
height: 200px;
width: 700px;
position: relative;
/*outline: 1px solid white;*/ // uncomment to test the weird!
}
#water-txt {
position: absolute;
top: -100px;
font-size: 12em; // Adjusting font-size does weird stuff with the box on FF! comment out overflow on #water to see what I mean
line-height: 1;
&::after {
content: "";
display: block;
height: 80px;
width: 700px;
/*outline: 1px solid gold;*/ // Uncomment to test weirdness!
position: absolute;
bottom: 0;
left: 0;
background: #231F20;
}
}
// Nothing here is being weird anymore
// so we're G2G!
#sub-text {
position: absolute;
top: 270px;
right: 100px;
@include transform(rotate(90deg));
font-size: .875em;
letter-spacing: 2px;
text-transform: uppercase;
}
View Compiled
// http://abduzeedo.com/minimal-typography-inspiration
This Pen doesn't use any external CSS resources.