Search

Recent Entries

ZeroSSL with IIS 10
Account Breach Monitoring
DBML Visualizer VERY Slow - solved!
Poor Man's SQL Log Shipping (Kinda)
Excel Column Letter To Number.com
Easy & Powerful Ecommerce Solution
asp:Menu Flicker on Page_Load - Solved
Windows Server 2008 Install DLL into GAC

Categories

Skip Navigation Links.
You are here: Rants, Rave, & Tips

 

By Ted Krapf on 7/13/2015 7:48 AM

Have an asp:menu that is flickering on (showing all the sub menus) on page_load and/or post back?  Of course you do, because that server control is pretty squirrely.   Here's the simple CSS fix that corrects the issue:


<style type="text/css">
/* fixes ugly menu flicker */
.menu ul li ul { display: none; }
.menu ul li { position: relative;  float: left; list-style: none; }
.menu ul li ul li { width: 100%; }
<style>


I've seen numerous "fixes" for Css menu getting flickering while page post back, but the ones I found never included the 3rd line.  If you have sub menus, the 3rd line (.menu ul li ul li) corrects the width and positioning issue.


Cheers and happy coding!