My menu flashes an unstyled list for the menu everytime you click to a new page. I have the CSS (menusm.css). Is this CSS or javascript causing the menu to flash unstyled.
You are linking to a whole load of style sheets there. It takes time to load all that stuff, so you are seeing the page before all the styles are loaded.
I guess that’s what they mean by bloat when using frameworks.
In my testing, should it still be affected by “bloat” when I move the CSS file to the top of the html head? the menu is the first thing to load and the nav it still flashes unstyled as the rest of the page loads… please advise!
Looking again, I think the javascript is not helping. I see the menu in vertical format while the 4 boxes showing stats do the “count up” effect. It seems to be running that before all the css is loaded. Some of the css is already loaded, as it does have some styling.
I’m not used to working with frameworks, or very much js, but I would maybe try putting all the css links before the js.
I counted 20 links to css files in the page, bloat is not about order, but quantity and potential for redundant code among all that. Though getting the order right may help in this case, as the delay it seems is happening while the count-up is running.
I’ve cleaned up/consolidated all of the critical CSS and now there are 3 CSS calls and I am still getting the flashing. Keep in mind this is locally, the link in the OP is the old/the original bloated version.
There does seem to be a connection to any page that runs a javascript chart. Some pages load instantly, and others with charts take a moment… any ideas to hide the menu until everything is loaded?
PS- With 22 CSS calls, I hope I’ve provided some entertainment as well
It would be better for your navigation styles to be served up via CSS rather than via JS, as it’s taking a lot of time for the scripts to load. You can see what’s taking a long time to load via the Network panel in Chrome.
I’d like for the CSS styles on the page to be customized to only apply to the menu. I’ve tried adding the class to the code like .newmenu ul li {}, however it keeps breaking the code… I know Im close but have been trying for the past hour. Any ideas?