Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have maintained div with below attributes
CSS
.mainDivCenter
{
    width:1250px;
    margin:0 auto;
    padding-top:5px;
    padding-bottom:5px;
    background-color:#FFD47B;
    /*background-color:blue;*/
    border:1px dotted gray;
    border-radius:20px 20px;
    padding-left:30px;
    padding-right:30px;
    min-height:680px;
    height:100%;
}

My query is when i put the more divs with in that div that does not increase the height controls are moved out of that div

please help me how to fix this.

My project is fully depend on div oriented design

my requirement is when ever added controls in maindiv that should be provide background color for child divs.
Posted
v3
Comments
Kornfeld Eliyahu Peter 26-Feb-14 3:16am    
Your question is unclear - pleas show the html/css for those child div's you talking about...
Charan_Kumar 26-Feb-14 3:26am    
use height as auto
DGKumar 26-Feb-14 8:53am    
Thank you.

1 solution

Add overflow: auto; to the CSS.

So, CSS Class would look like...
CSS
.mainDivCenter {
    overflow: auto;
    width:1250px;
    margin:0 auto;
    padding-top:5px;
    padding-bottom:5px;
    background-color:#FFD47B;
    /*background-color:blue;*/
    border:1px dotted gray;
    border-radius:20px 20px;
    padding-left:30px;
    padding-right:30px;
    min-height:680px;
    height:100%;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900