2 Replies Latest reply on May 24, 2011 2:01 AM by osgood_

    CSS - DIV 100% height

    TELLO_DE

      Hi NG,

       

      i don´t find the problem.

      body, html 100%

      in my opinion all the parent elements 100% too...

      ???

       

      Klick here...the left and the right columns (red) from the table must be 100% height. But it is not working. I have no idea why....

       

      Is there anybody how can help?

       

      http://s362531241.online.de/test.html

       

       

      Greetings

      TELLO

        • 1. Re: CSS - DIV 100% height
          osgood_ Level 8

          Before going too far you might just want to test the solution below out in Firefox 3 on the PC (not sure if it works in that browser)

           

           

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml">
          <head>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
          <style type="text/css">
          html, body, #myTable {
                height:100%;
                margin: 0;
                padding: 0;
                border: none;
                text-align: center;
             }

           

          #left, #right {
          background-color:#F00;
          }

           

          #center {
          background-color:#03C;
          }

           

          </style>
          <title>100% table height</title>
          </head>

           

          <body>
            <table id="myTable" width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
          <td id="left">Left</td>
          <td id="center">Center</td>
          <td id="right">Right</td>
          </tr>
          </table>
          </body>
          </body>
          </html>

          • 2. Re: CSS - DIV 100% height
            TELLO_DE Level 1

            osgood_,

             

            ok - i tried your code and it works also on ff3. So i will change my tables to the div style now. Hope it works fine.

            But im confused, because anyhow - i can not get the problem with my style. In my opinion it must be fine too ;-(

             

             

            thanky

            TELLO