Solved

Auto resize height

Posted on 2004-09-27
2
2,139 Views
Last Modified: 2008-03-04
I am trying to find a way to have a block's height to equal the parent's height

the CSS FILE,  for the menu part,  i added bottom:0; height:100%;  i thought that this will enable the menu block to stretch along with the page block.
the content block is the one that have the content that push down the page block. i want menu block to go along with it even though it doesnt have content.
Is there a way to do this?  I am lousy in explaining it in technical term, i hope this is clear, please let me know if its not clear


Heres an example

CSS FILE

#page{
      /* Colors */
                        
      /* Element Control */                  
      width:800px;
      margin-bottom:30px;            
      margin-right:auto;
      margin-left:auto;      
}

#content{      
      /* Element Control */
      float:right;      
      width:74%;      
}

#menu{      
      /* Element Positioning */
      top:0;            
      bottom:0;
            
      /* Element Control */                              
      width:25%;      
      height:100%;
      margin-right:1%;                                    
}



HTML FILE

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />      
      <link rel="stylesheet" type="text/css" href="template.css">
      <title> Tour  Zurich! </title>
</head>

<body>      
      <div id=page>
            <div id=content>
                  <table width="100%">
                        <tr>
                    <td width="50%" bgcolor="#C6E2FF">
                      <div>random data</div>
                    </td>
                    <td width="50%" colspan=2 bgcolor="#C5FFC5">
                      <div>random data</div>
                    </td>
                       </tr>
            
                  <tr>
                    <td height="200" bgcolor="#E8F4FF" valign:"top">
                      <img src="images/z3.jpg" alt="DATA" />
                      <ul>
                        <li>random data</li>
                        <li>random data</li>
                        <li>random data</li>
                        <li>random data</li>
                        <li>random data</li>
                      </ul>
                    </td>
                    <td colspan=2 bgcolor="#E7FFE7" valign:"top">
                      <img src="images/z2.jpg" alt="DATA" />
                      <ul>
                        <li>random data</li>
                        <li>random data</li>
                        <li>random data</li>
                        <li>random data</li>
                        <li>random data</li>
                      </ul>
                    </td>
                       </tr>
            
                  <tr>
                    <td bgcolor="#C5FFC5">
                      <div>Accomodations</div>
                    </td>
                    <td colspan=2 bgcolor="#C6E2FF">
                        <li>random data</li>
                    </td>
                       </tr>
            
                  <tr>
                    <td height="200" bgcolor="#E7FFE7" valign:"top">
                      <img src="images/z4.jpg" alt="data" />
                      <ul>
                        <li>random data</li>
                        <li>random data</li>
                        <li>random data</li>
                        <li>random data</li>
                        <li>random data</li>
                      </ul>
                    </td>
                    <td colspan=2 height="200" bgcolor="#E8F4FF">
                      <img src="images/z1.jpg" alt="DATA" />
                      <ul>
                        <li>random data</li>
                        <li>random data</li>
                        <li>random data</li>
                        <li>random data</li>
                        <li>random data</li>
                      </ul>
                    </td>
                       </tr>
                  </table>
            </div>
            <div id=menu>
                  MENU                  
            </div>                  
      </div>            
</body>
</html>
0
Comment
Question by:BuggyLogic
2 Comments
 
LVL 11

Accepted Solution

by:
neester earned 50 total points
ID: 12167011
I dont think it can be done under normal implementation...
but here are some links that might offer you some help:


http://www.webmasterworld.com/forum83/200.htm
http://www.quirksmode.org/css/100percheight.html


they should offer some assistance.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Overlap photo won't go all the way to the right 1 23
Slider Moving to right hand side CSS? 2 31
Changing Two Areas of a Page 5 27
Box Locations 6 21
Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question