CSS center text (horizontally and vertically) inside a div block

Ask a question
0

I have a div set to display:block (90px height and width), and I have some text inside.

I need the text to be aligned in the center both vertically and horizontally.

I have tried text-align:center, but it doesn’t do the horizontal part, so I tried vertical-align:middle, but it didn’t work.

Any ideas?

offer bounty
add comment

0 Answer

Your Answer