This problem just came out of nowhere, one day my menu is showing as it should, the next day, it is not. I even tried rolling back to the older version of the files, but somehow this didn't change a thing. It might have been an update to Visual Studio 2010, which got automatically installed or something.
After looking into the rendered html with IE8 and its developer tools (press F12 to get these, then CTRL-B to click an element in the page and have its tag selected in the developer tool), I discoverd an
a
-element above my Menu:(The
div
with class Menu
is my own div
, in it you see the table
with class ct100_Menu1_2
which is the actual menu, with 2 a
elements around it)After looking into this
#ct100_Menu1_SkipLink
I found a property SkipLinkText
on the Menu control. If you set it to the empty string (SkipLinkText=""
), the strange empty space is gone!Please be aware though, that these SkipLinks are meant for people who are using a screen reader. The text in it is read aloud and allows a visually impaired user to skip the menu and jump to the contents of the page by following this link. The fix I described here removes this so-called skiplink and thus makes your page less user-friendly for the visually impaired.
12 comments :
Thx Michael your solution and another here http://blog.tjitjing.com/index.php/2011/03/asp-net-4-0extra-space-above-menu-in-chrome-and-safari-using-menu-control.html
Hi Michael - just wanted to say thanks for the solution - I tried the one posted in the comment above first but this didn't work - yours did though :-)
Cheers
Alex
Hi Alex,
Glad I could help. Thanks for your message.
Regards,
Michael
THANK YOU!!!
Great
Thanks a lot
Great article
We can also submit our .net related article links on http://www.dotnettechy.com to increase traffic
Hours of google'ing. Two minutes looking at your blog solved the problem. Thanks!
thanks it was useful
Many Thanks
Many thanks
Niiiiiiice! Thanks Microsoft for more hours wasted.
Good job Michael!
Thanks!
Post a Comment