I am creating a website I have divs which are resizable using jquery. When I resize them only the width of the child divs get resized. You can see the site and its code here . How can the height of the child divs get resized too?
Ok I solved it by adding this code:
$(".window").resize(function()
{
$(this).children('.inner').css(
{
height: $(this).height()-2
});
$(this).children().children('.content').css(
{
height: $(this).height()-$(this).children().children('.top').height()*2
});
});
you need to change the child div height to 100%
in your case the div with class = "inner" need to have css property
div.inner
{
height = 100%
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.