I'm trying to use a layered font using CSS ":after" on a class to load the shadow version of the font. The css for the font uses weight to call the different font layers.
Everything works as expected until I try to center the text, and then the layers don't align. Any tips, alternate approaches?
My test page is here.
The code for the page:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Layer test</title>
<link rel="stylesheet" type="text/css" href="/webfonts/besley_shaded-web/besley_shaded.css">
<style type="text/css">
.shade{
position: relative;
font-size: 8em;
font-family: 'Besley Shaded Web';
color: #595774;
font-weight: 400;
}
.shade:after{
position: absolute;
top: 0;
left:0;
content:"Story Time";
color: #F2B035;
font-weight: 500;
}
.shade2{
position: relative;
text-align: center;
font-size: 8em;
font-family: 'Besley Shaded Web';
color: #595774;
font-weight: 400;
}
.shade2:after{
position: absolute;
top: 0;
left: 0;
content:"Story Time";
color: #F2B035;
font-weight: 500;
}
</style>
</head>
<body>
<h1>Left align layers as hoped,
Center align not at all! </h1>
<p class="shade">Story Time</p>
<p class="shade2">Story Time</p>
</body>
</html>