Vertically center text with CSS

Anyone who has used CSS for awhile knows that vertically aligning stuff isn’t easy. Vertically aligning just text, however, is pretty simple. If your container is 30px tall, just set the line-height to 30px too and your text will be perfectly centered! Hurray! This only works for a single line of text however… if you want more, you’re probably better off fighting with margins, padding, or absolute positioning.