Click here to Skip to main content
15,881,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is a CSS question in asp.net.
I have a page which is surrounded by container div. This contains contenthome div, with flashhome div inside it.
Container and contenthome height property is set to auto. But when I increase flashhome height, container and contenthome height is not changed accordingly. How can I achieve autoincrease and decrease of container and contenthome heights depending on flashhome height.
I have inserted CSS code below.

CSS
#container {
    width: 750px;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    border:1px;
    border-color: #b7b7b7;
    border-style: solid;
}
#contentHome {
    width: 750px;
    height: auto;
    position: relative;
    display: block;
    overflow: hidden;
}
#flashHome {
    float: left;
    display: block;
    width:485px;
    height: 255px;
    margin-left: 15px;
    margin-top: 5px;
}
Posted
Updated 22-Aug-11 17:32pm
v3
Comments
Philippe Mori 21-Jul-11 21:01pm    
It would be easier to understand if you would provide the relevant HTML part of the file.

1 solution

Hi
Just i create fiddle for your query.

http://jsfiddle.net/L4GDt/[^]

Changes in the Flash Home div.

CSS
#flashHome {
    position: relative;
    display: block;
    width:485px;
    height: 255px;
    margin-left: 15px;
    margin-top: 5px;
    background:#f00;
}
 
Share this answer
 
Comments
Sunasara Imdadhusen 28-Apr-14 4:40am    
Good answer Ashish...keep it up
Nirav Prabtani 28-Apr-14 5:38am    
my 5+

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