<div class="block block-1">
<code>padding-top: 12px;</code>
</div>
<div class="block block-2">
<code>padding-top: 5%;</code>
</div>
<div class="block block-3">
<code>padding-top: 0;</code>
</div>
.block {
width: 250px;
height: 150px;
background-color: #eee;
border: 2px solid #666;
margin-bottom: 18px;
text-align: center;
line-height: 150px;
}
.block > code {
background-color: grey;
display: block;
}
.block-1 {
padding-top: 12px;
}
.block-2 {
padding-top: 5%;
}
.block-3 {
padding-top: 0;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.