PDA

View Full Version : glossymenu accordian menu



kated
12-10-2016, 05:44 PM
1) Script Title: DD Accordian Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-glossy.htm

3) Describe problem: Keeps pushing the page contents down on expand

Hi

Is there a code to stop the menu from pushing all the content on the page downwards on opening the expand button please?

If so please may I have it? I am new to javascript and like using ur stuff its great but its pushing the content downwards on opening the links

sincerely
Kated

Beverleyh
12-11-2016, 12:20 PM
Try positioning .glossymenu absolutely to take it out if the normal flow of the document http://www.w3schools.com/cssref/pr_class_position.asp

molendijk
12-11-2016, 02:21 PM
To implement Beverleyh's suggestion, replace

<div class="glossymenu">
with

<div class="glossymenu" id="glossymenu" style="position: absolute">
then if you want to locate the rest of the page beneath the menu, put this immediately beneath the closing tag of the div where the menu is written:

<div id="beneath_glossymenu" style="width: 100%; ">&nbsp;</div>
<script>
document.getElementById('beneath_glossymenu').style.height=document.getElementById('glossymenu').clientHeight+document.getElementById('glossymenu').offsetTop+'p x'
</script>