Connecting Tech Pros Worldwide Help | Site Map

Delay in loading Menu

Newbie
 
Join Date: Jan 2009
Posts: 16
#1: Feb 7 '09
My web application is developed in PHP.
The Stylesheet for my Menu is written in a php file and CSS in javascript.

When i access a page it shows the menu as such without any style.
  • Main Menu
    • sub menu1
    • sub menu2
    • sub menu3
  • Main Menu2
  • Main Menu3
  • Main Menu4

Once the page loading is complete the style is applied. I am working with IE7
Is there any way to load menu along with its style at first.

Thank you
Expert
 
Join Date: Aug 2008
Posts: 397
#2: Feb 7 '09

re: Delay in loading Menu


The possibilities are longer than my arm...

--Does the page have a doctype?
--Is the markup valid?
--Is the CSS valid?
--Are you on a slow connection?
--If the CSS and JS are being called from external files, make sure the link for the CSS file is above that of the JS file in the head of the document. This is a sometimes known loading issue with css/js in Gecko and Safari (and possibly IE/7).
--I recall there is a filed bug report at MS regarding flash of unstyled content (FOUC) on some machines using IE/7, and IE/8 when the style sheet is called using the @import method (but I do not know if either, or both, were resolved.
-- Are you sure you have assigned style to the hover state in the CSS-- lack of same has been known to sometimes cause delay menu load in IE/7
-- Are you throwing any JS errors
-- If have browser add-ons, try disabling them and see if the menu loads the styles of the menu faster...
Newbie
 
Join Date: Jan 2009
Posts: 14
#3: Feb 7 '09

re: Delay in loading Menu


if u r using a template, style in template will b executed only after page fully loads.u can avoid it by giving css style for menu in the same page where it is delayed.
hsriat's Avatar
Expert
 
Join Date: Jan 2008
Location: Bath, UK
Posts: 1,609
#4: Feb 14 '09

re: Delay in loading Menu


Never faced such problem. Did you try inline style attribute? Or do something creative with JavaScript (Display the page only when fully loaded)
Reply