Reputation: 20468
plz see the below html :
<head runat="server">
<title></title>
<style type="text/css">
html, body
{
padding: 0;
margin: 0;
width: 100%;
height: 100%;
border: 1px solid red;
}
#MainDiv
{
width: 100%;
min-height: 100%;
border: 1px solid blue;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div id="MainDiv">
Contents - A Repeater That Will Grow From Code Behind
</div>
</form>
</body>
</html>
how can i have height -> 800px for MainDiv At Start(Low Content)?
and force it's height to increase when contents are growed!
thanks in advance
Upvotes: 0
Views: 424
Reputation: 92803
write like this
#MainDiv{
min-height:800px;
}
EDIT:
Answer of your above comment
If you want html & body 100%
height then just write like this
html, body{
height:100%
}
Upvotes: 1
Reputation: 4752
#MainDiv
{
min-height: 800px;
height: auto;
}
Let me know if it helps.
Upvotes: 1