View Full Version : HTML/CSS - vertical aligning a title.

12-17-2009, 12:05 AM
I'm trying to have the title of my div to be dead centre vertically. e.g..

<div id="header">Title</div>

Title shows at the bottom of the div, how can i have it centered?

12-17-2009, 12:40 AM
Hello forcerhpool,
The quick answer might be <div id="header"><h1>Title</h1></div> and #header h1 {line-height: 20px;}

Adjust that line-height as needed.