css height=100%

Last post 07-03-2007 6:05 AM by ITConclusion. 3 replies.

Sort Posts:

  • css height=100%

    04-27-2005, 5:20 PM
    • Loading...
    • Salameh
    • Joined on 06-30-2003, 9:43 PM
    • Posts 193

    I have this senerio where i cut an example out of my html of what i a trying to accomplish.  I have a table embeded into a second table.   With the second embeded table is there any way to declare a height of 100% of the cell it is emeded in.  I know the with will work with a width=100% but how do you set the height up.

     

     

    <table><tr>

     <td>

                

    <tableid=table2 height=100%><tr><td>hello</td></tr></table>

     </td>

     <td>  <br><br><br><br><br><br>

     </td>

    </tr>

    </table>

  • Re: css height=100%

    04-27-2005, 9:23 PM
    • Loading...
    • BenCon
    • Joined on 10-30-2002, 8:41 PM
    • Redmond, WA
    • Posts 16

    You need to have a height on the cell that the inner table is inside of, or a height on the row that owns that cell.

    The following HTML demonstrates this:

    <table>

    <tr>

    <td style="height:200px;">

    <table id=table2 height=100%>

    <tr>

    <td>hello</td>

    </tr>

    </table>

    </td>

    </tr>

    </table>

    Ben Constable - http://weblogs.asp.net/bencon/

    This posting is provided "AS IS" with no warranties, and confers no rights
  • Re: css height=100%

    04-27-2005, 9:55 PM
    • Loading...
    • Salameh
    • Joined on 06-30-2003, 9:43 PM
    • Posts 193
    actually there is a better way i found.  All you have to do is set the td containing the table to a height of 100%.  Thanks for your help.
  • Re: css height=100%

    07-03-2007, 6:05 AM

    Hey all.

    I found the best way to do it with the DIV layout.

    Solution here: http://richbrains.blogspot.com/2007/07/div-layout-with-height-100-problem.html

Page 1 of 1 (4 items)
Microsoft Communities
Page view counter