Hide Element until Page Loadedby satman
So Ive had a problem with this ever since I had this blog up and running a few months ago. The menu bar is a .NET Menu Control but it is styled using CSS. When the page loaded the delay caused by the recent list index made the menu display with partial CSS for a second or two until the full CSS was loaded and applied by the browser.

Finally I managed to find a method where it initially hides the menu and when the page is loaded displays it using Javascript.
this is how for the menu element called 'Menu1' with class 'menu' applied in CSS
in CSS sheet set
.menu { display:none; }
in HTML set 
<body onload="javascript:document.getElementById('Menu1').style.display = 'inline-block';">
this simply triggers the javascript when the page loads the main body and resets the display to show the menu element

0 Comments #119 Monday, May 2, 2011 11:18 PM Filed in Apps
Name (Required)
Email (Required)
URI(will display as a linkback)
Comment (Required)
119 (no script tags allowed)

Custom Blog Engine Developed by Satman