Source Code: (back to article)
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style>
body {
background: #c2c2c2;
font-size: 90%;
}
main {
background: #fff;
margin: 20px 0;
padding: 40px;
}
main span {
display: inline-block;
background: #83d483;
color: #fff;
height: 100px;
line-height: 100px;
padding: 20px;
width: 50%;
white-space: nowrap;
}
</style>
</head>
<body>
<main>
<span>Example of a vertically centered line.</span>
</main>
</body>
</html>