1 reply [Last post]
bionnaki
bionnaki's picture
User offline. Last seen 7 years 39 weeks ago. Offline
newbie
Joined: 2004-05-08
Posts: 1
Points: 0

http://www.psidonia.net

CSS newbie here Smile

If you notice the menus on both sides, you can click "drop menu" and the links collapse.

When the site loads, the menus are expanded. I am wondering if it possible to have them load collapsed. I'd like to have them hidden at first, but if the viewer wishes to see the links, they can click & expand them.

anyone know how to correct this? I am sure its real easy - I just cannot figure it out.

thanks!

Tony
Tony's picture
User offline. Last seen 1 hour 9 min ago. Offline
rank Moderator
Moderator
Timezone: GMT+10
Joined: 2003-03-12
Posts: 3705
Points: 1115

.::dropdown menu problem::.

Hi bionnaki,
If you set all the dd styles to display:none in your css file they will be hidden when the page first loads.

But a better way may be to use javascript to hide them as if the browsers don't have javascript enabled the whole menu will still be available.
Something like this would be an easy way to do it.

<script type="text/javascript"> 
window.onload=function{ 
   document.getElementById("dd1").style.display="none"; 
   document.getElementById("dd2").style.display="none"; 
   document.getElementById("dd4").style.display="none"; 
   document.getElementById("dd5").style.display="none"; 
} 
</script>

Hope that helps

Your question may have already been answered, search and read before you ask.