Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I may be misunderstanding the question (your link to the table-based example isn't working), but it sounds like you're trying to create two columns with equal height. There are several techniques you can use, here are three of them:</p> <ol> <li><p>You can give each <code>DIV</code> a large bottom padding, and an equally large, but negative, bottom margin.</p> <pre><code>#main { overflow: hidden; } #left, #right { float: left; padding-bottom: 1000em; margin-bottom: -1000em; } </code></pre> <p>This solution is not without it's problems; if you attempt to link to an element in one of the columns (e.g. you have an element in one of the columns with <code>id=foo</code> and you link to <code>mypage.html#foo</code>) then the layout will break. It's also hard to add bottom borders using this technique.</p> <p>Full example from Natalie Downe: <a href="http://natbat.net/code/clientside/css/equalColumnsDemo/10.html">http://natbat.net/code/clientside/css/equalColumnsDemo/10.html</a></p></li> <li><p>You can give one of the columns a negative right margin, and the other a very wide left border.</p> <pre><code>#left, #right { float: left; } #left { background: red; width: 200px; margin-right: -200px; } #right { border-left: 200px solid red; } </code></pre> <p>More information on Smashing Magazine: <a href="http://coding.smashingmagazine.com/2010/11/08/equal-height-columns-using-borders-and-negative-margins-with-css/">http://coding.smashingmagazine.com/2010/11/08/equal-height-columns-using-borders-and-negative-margins-with-css/</a></p></li> <li><p>You can fake it by giving <code>#main</code> a background image that includes the background for both columns. This technique is known as “Faux Columns” and is useful when you want complex backgrounds, or a decorative border between the columns.</p> <p>More information on A List Apart: <a href="http://www.alistapart.com/articles/fauxcolumns/">http://www.alistapart.com/articles/fauxcolumns/</a></p></li> </ol> <p>As one commenter on the question noted, you can also use a table. However, unless you're displaying tabular data <code>TABLE</code> is not the appropriate HTML element.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload