tags:

views:

171

answers:

3

Hello,

Currently, I have a code like this

<!DOCTYPE HTML PUBLIC "-// W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd"&gt;
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
body {
background:#000;
}

#header{
    float:right;
    width:800px;
}

#topbar { 
position: absolute; 
top: 0; 
left: 0; 
width: 100%; 
height: 30px; 
}

#container-box{
    margin:0px auto; 
    border:1px solid black; 
    width:950px;
    margin-top:40px;
    height:550px;
}

#image-box{
    border:3px solid Black; 
    position:absolute;
    float:left;
    width:120px;
    height:120px;
    z-index:1000;
    background:#000099;
}

#inside-box{
    z-index:-100;
    margin:0px auto; 
    border:1px solid #737373; 
    width:900px;
    margin-top:50px;
    height:100%;
}

#inside-left{
    float:left;
    border-right:1px solid #737373; 
    width:250px;
    height:100%;
    text-align:bottom;
}

#inside-right{
    float:right;
    width:649px;
    color:#FFFFFF;
}

#right-top{
    float:left;
    width:649px;
    height:375px;
    border-bottom:1px solid #737373;
}

#right-btm{
    float:left;
    padding-top:5px;
    width:649px;
    height:150px;
}

#footer{
    color:#c3c3c3;
}
#footer #footer_left{
    float:left;
    width:200px;
    font-size:9px;
    margin-top:5px;
    margin-left:30px;
    text-align:left;
}

#footer #footer_right{
    float:right;
    width:500px;
    font-size:14px;
    margin-right:30px;
    margin-top:5px;
    text-align:right;
}
#footer #footer_right .linkage{
    float:right;
    margin-right:20px;
}


#footer #footer_right .linkage a{
    color:#c3c3c3;
    text-decoration:none;
}

</style>
</head>
<div id="header">
<div id="topbar"></div>
</div>

<div id="container-box">
    <div id="image-box"></div>
    <div id="inside-box">
     <div id="inside-left">
      <table width="100%" cellspacing="15px" height="100%">
       <tbody><tr valign="bottom">
        <td>
                <div class="elements"></div>
               <div class="elements"></div>
        </td>
       </tr>
      </tbody></table>
     </div>
     <div id="inside-right">The inner German border was the frontier between the German Democratic Republic (East Germany) and the Federal Republic of Germany (West Germany) from 1949 to 1990. Not including the similar but physically separate Berlin Wall, the border was 1,381 kilometres (858 mi) long and ran from the Baltic Sea to Czechoslovakia. It was formally established on 1 July 1945 as the boundary between the Western and Soviet occupation zones of Germany. On the Eastern side, it was made one of the world's most heavily fortified frontiers, defined by a continuous line of high metal fences and walls, barbed wire, alarms, trenches, watchtowers, automatic booby-traps and minefields. The border was a physical manifestation of Winston Churchill's metaphor of an Iron Curtain separating the Soviet and Western blocs during the Cold War. Built by East Germany in phases from 1952 to the late 1980s, the fortifications were constructed to stop the large-scale emigration of East German citizens to the West. It caused widespread economic and social disruption on both sides. On 9 November 1989, the East German government announced the opening of the Berlin Wall and the inner German border. The inner German border was not completely abandoned until 1 July 1990, exactly 45 years to the day since its establishment, and only three months before German reunification formally ended Germany's division. Little remains today of the inner German border's fortifications. The inner German border was the frontier between the German Democratic Republic (East Germany) and the Federal Republic of Germany (West Germany) from 1949 to 1990. Not including the similar but physically separate Berlin Wall, the border was 1,381 kilometres (858 mi) long and ran from the Baltic Sea to Czechoslovakia. It was formally established on 1 July 1945 as the boundary between the Western and Soviet occupation zones of Germany. On the Eastern side, it was made one of the world's most heavily fortified frontiers, defined by a continuous line of high metal fences and walls, barbed wire, alarms, trenches, watchtowers, automatic booby-traps and minefields. The border was a physical manifestation of Winston Churchill's metaphor of an Iron Curtain separating the Soviet and Western blocs during the Cold War. Built by East Germany in phases from 1952 to the late 1980s, the fortifications were constructed to stop the large-scale emigration of East German citizens to the West..</div>
</div>

</div>  
</body>
</html>

The output is like this.

alt text

Currently, content is inside the box because it's not reach yet. But when content is exceed the height. It is going to be like this. Because i set the fixed height.

Please see this image

alt text

But when I change all the height as 100% height, it doesn't work. Output is changed like this

alt text

Can anyone help me to fix it ? Thanks much.

With Regards,

A: 

It's been a while since I've coded CSS, but isn't there a way to turn the scrollbar on? Would this be useful and make that box scrollable.

Better yet, I think there is some attribute called overflow. I'm pretty sure if you turn overflow off (in inside-right) it should solve your problem.

Hope this helps. Sorry if I'm completely wrong.

ServAce85
A: 

inside CSS for

#inside-box add {overflow:auto;}

#inside-right add {border: 1px solid #fff;}

Inform if it you get correct

Thank you

RSK
A: 

I believe your problem has to do with the fact that both inside-left and inside-right are floating elements within the containing div. If you add the following to your style sheet:

#inside-bottom{
    clear:both;
}

And then add the following just below your inside-right div definition:

<div id="inside-bottom"></div>

You will get a much better result.

Gene Goykhman
Skip the ` ` and just use `<div id="inside-bottom"></div>`. Otherwise the browser will render the div with some height because it has to display that ` `. That clear div is meant to be invisible.
Frank DeRosa
thanks Gene, it's solved my problem. But only one thing, please see this image.http://img200.imageshack.us/img200/9853/outputcss3u.pngBut the left border should be till bottom. But it's only on top. How can i fix that ? Thanks.
spotlightsnap
Your challenge is that there is no way to control the height of one floating div based on the height of another floating div. Take a look at this article on 2-column CSS layouts: http://www.456bereastreet.com/lab/developing_with_web_standards/csslayout/2-col/. Pay particular attention to the information just before step 7: it describes alternative workarounds to get the effect you desire. You might be asking yourself: shouldn't this be easier? The answer is yes, it should be (especially considering how common this problem is), but unfortunately I do not believe it is.
Gene Goykhman