Hacker News new | past | comments | ask | show | jobs | submit login

You miss the part of tables. It is until today the only really reliable way to center a div box horizontally and vertically:

      <html>
        <head>
          <title>Vertical Alignment</title>
          <style type="text/css">
            html, body, bodytable { height: 100%; }
            bodytablerow { vertical-align: center; }
            bodytablecell { text-align: center; }
            content { 
              text-align: auto;
              width: 100px; height: 100px
            }
          </style>
        </head>
        <body><table id="bodytable">
          <tr id="bodytablerow">
            <td id="bodytablecell">
              <div id="content">
blabla

              </div>
            </td>
          </tr>
        </table></body></html>



The deadline for YC's W25 batch is 8pm PT tonight. Go for it!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: