 <p>The original html is incorrect and the div's height and width should be supplied in css (or using the style attribute).</p> <p>To align in the center vertically and horizontally:</p> <pre><code>#content1 { width: 400px; height: 100px; text-align: center; display: table-cell; vertical-align: middle; } </code></pre> <hr> <p>As there are two of these divs immediately next to each other then <code>table-cell</code> will cause them to sit adjacent to each-other, on the same line. I would either wrap each in another div (not a great solution) or place a <code>br</code> tag between them (or some other content).</p> <p>If the intention is to have several of the divs immediately next to, and below, each-other then I would consider using a table.</p>