dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: How to resize the parent div together with the child collapsible div?

  1. #1
    Join Date
    Jul 2017
    Posts
    2

    Question How to resize the parent div together with the child collapsible div?

    Hi guys!
    I have a parent div used to make my child panel resizable and draggable. Now I wanted to do the panel collapsible. But when it collapses the parent panel should disappear too ... but it is not working. You can see the demo I made here (please see, adding a panel and trying minimize):

    https://codepen.io/AlamBique/pen/LLqddr/?editors=1010

    How to collapse (auto-resize) the parent div together with the body-panel? And why the .panel-body (using height: 100%) extrapolates the height of the parent div?

  2. #2
    Join Date
    Dec 2012
    Posts
    1,446
    Try this javascript:
    https://pastebin.com/PXmKWTTN
    and this CSS:
    Code:
            .painelPadrao {
                width: 200px;
                height: 150px;
                background-color: green;
                overflow: hidden;
            }
    I added an eventlistener to the minify button that minifies and expands the parent container. I switched off the toggling function of Bootstrap as it interfered.

    Unfortunately the forum refused posting my code. View it at pastebin instead.
    Last edited by Sempervivum; 07-15-2017 at 01:32 PM.

  3. #3
    Join Date
    Jul 2017
    Posts
    2
    Thanks Sempervivum! I will try this.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles