The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › JQuery slide animation reveal div height issue
I’m building slide dropdown menu by using jQuery, but it expand my header height. I already set position: relative to parent but it doesn’t work. Hope anyone can fix my issue.
position: relative
Codepen
One way is to give the parent li position: relative and the ul position: absolute
position: absolute
li { position: relative; } li ul { position: absolute; z-index: 1; // or higher if needed }
play with the top, right, bottom and or left properties for the li ul to move it into place.
li ul
Hi @soren
I’m using <ul> method to display select and tried your suggestion but it doesn’t work correctly so I deleted. Please view my code and give me advice.
<ul>
http://codepen.io/thehung1724/pen/IqsuJ
Are trying to replicate a select/option type of thing?
select/option
What you have is a very odd way making a ‘menu’.