Skip to content Skip to sidebar Skip to footer

How To Move Elements When Drop Down Is Expanded

I am currently working on a task where I am required that after the drop down is expanded the elements below the dropdown should not get hidden. They should move down as the drop d

Solution 1:

If you mean you don't want the elements hidden behind the dropdown then you have two ways to go..

  1. Attach an onClick event to the dropdown to change the min-height css attribute of the box below (which contains the other elements) or the container of the select box from 'auto' to the needed amount of pixels.

  2. Implement a dropdown in CSS with divs/ul showing and hiding the children elements. You can take the same approach as a website does dropdown menu in their headers. This will push all content down.

Post a Comment for "How To Move Elements When Drop Down Is Expanded"