Is there any easy way to center the text vertically in a fixed-height H1 heading, such as:
I would like the text to be centered vertically on the right-hand side. I have tried nesting a span inside the H1 and using:
but it didn't have any effect.
--James
Code:
<style type="text/css">
h1 {
margin: 0;
padding: 0;
height: 120px;
background: #CCC;
text-align: right;
}
</style>
...
<h1>Header</h1>
I would like the text to be centered vertically on the right-hand side. I have tried nesting a span inside the H1 and using:
Code:
h1 span {
vertical-align: middle;
}
...
<h1><span>Header</span></h1>
but it didn't have any effect.
--James