Home › Forums › CSS › vertical alignment › Reply To: vertical alignment
September 9, 2013 at 10:56 pm
#149571
__
Participant
Out of curiosity, why is that an image at all? it’s just text…?
Two examples:
— using your existing HTML markup
— using an alternative (cleaner) markup
Basically, these both do the same thing: center horizontally using text-align
; center vertically by using padding
/margin
; then take the <h1>
out of the flow by giving it an absolute
position. This works very well “as-is,” but won’t work the same way if you add more elements to the <header>
.