Vertical-align: Middle — something's odd here
-
I’m trying to align text vertically in a box, using vertical-align: middle. But it’s aligning to the top of the box. In all my sites, I’ve never aligned text this way before, so I had to learn today that it’s not “center” but “middle”. But I’m still not getting vertical alignment to work like I want.
So many forum answers here about about use in tables, but this is just a simple div with text inside it as a header over a column of text:
<div> —- (container)
<div> — (heading)
Header text
</div>
<div> — (content)
content
</div)
</div>Just want to know that I’m not missing something obvious here. The lack of forum answers on normal vertical alignment outside of tables makes me wonder if I’m missing something obvious.
- The topic ‘Vertical-align: Middle — something's odd here’ is closed to new replies.