Monday, December 20, 2010

ASP:Menu SkipLink

For those who landed here looking for a solution together with the cristal clear explanation, sorry, no, I do not have one :-(

Symptom.
We have migrated our internet facing site from SharePoint 2007 to 2010. We (needed to) have redone our custom master page. We did so having the 2010 minimal masterpage http://code.msdn.microsoft.com/odcSP14StarterMaster as the basis.
Then we found the Global Navigation menu, which uses the SharePoint:AspMenu control (I think it behaves pretty much the same as ASP:Menu), appears a little lower than it used to.
It does so to me everywhere. I have IE8 and FF3.5 on my PC. But later realized that it is OK on their old versions; IE7 and FF1.5.

The only difference is with the so-called "skip navigation link". It is visible (and thus takes some space) with the new master.





It was invisible with the old master.





The above screenshots are from FireBug. But up to now, I do not know what makes it "visible" or "ïnvisible".

My solution for the time being is to set DOCTYPE of the masterpage back to XHTML 1.0 Transitional. Do not ask me why...

The above mentioned minimal masterpage comes as XHTML 1.0 Strict. It is pity that I had to go back "Transitional". But this is the only workaround that I so far found.

2 comments:

Jeff Kissinger said...

If you add SkipLinkText="" manually to the asp:Menu tag the space/gap will go away. Simply clearing it out via the menu property in Visual Studio won't work though, you actually have to add the text in manually.

See reported problem to Microsoft: http://connect.microsoft.com/VisualStudio/feedback/details/581600/asp-net-menu-control

Anonymous said...

Thank Jeff

It worked for me for Google Chrome