Solved

Auto resize height

Posted on 2004-09-27
2
2,134 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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now