Solved

Auto resize height

Posted on 2004-09-27
2
2,143 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Suggested Courses

624 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