How to create two columns on a web page?

Posted by Roman on Stack Overflow See other posts from Stack Overflow or by Roman
Published on 2010-12-27T11:49:10Z Indexed on 2010/12/27 11:54 UTC
Read the original article Hit count: 174

Filed under:
|
|
|
|

I want to have two columns on my web page. For me the simples way to do that is to use a table:

<table>
   <tr>
      <td>
         Content of the first column.
      </td>
      <td>
         Content of the second column.
      </td>
   </tr>
</table>

I like this solution because, first of all, it works (it gives exactly what I want), it is also really simple and stable (I will always have two columns, no matter how big is my window). It is easy to control the size and position of the table.

However, I know that people do not like the table-layout and, as far as I know, they use div and css instead. So, I would like also to try this approach. Can anybody help me with that?

I would like to have a simple solution (without tricks) that is easy to remember. It also needs to be stable (so that it will not accidentally happen that one column is under another one or they overlap or something like that).

© Stack Overflow or respective owner

Related posts about html

Related posts about css