简体   繁体   中英

jquery-ui resize child divs also

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?

Edit

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM