Problem with height of floating divs
I need to put two divs side by side. First div should have constant width, second take rest free space. Both of the div should has the same height but at least should takes all browser screen. I have written the following code:
<head id="Head1" runat="server">
<title>My Testing page</title>
<style type="text/css">
#mainDiv { height:100%;}
#leftDiv {float:left; width:200px; height:100%;}
#rightDiv { height:100%; }
</style>
</head>
<body>
<div id="mainDiv">
<div id="leftDiv"></div>
<div id="rightDiv"></div>
</div>
</body>
But height of the right div is always set to 100% of browser screen, Even if content of this d开发者_开发技巧iv is bigger. I would like have resizable height of those divs.
As far as I know height:100%
would act as a fixed height according to the browser's height.
so why dont you put
min-height:100%
.
This should work but I havent tested it myself tbh.
精彩评论