Thursday, May 19, 2011

ASP Menu: Above Extra Space on Chrome Browser


STORY

While working on a project, I tried to remove the extra space above an asp menu which is visible on Google Chrome browser ,but not on IE.

I did not find any padding or margins that cause that !!


To find the reason I view the output html source and I find that there were an image above the control !!

<img alt="Skip Navigation Links" src="/WebResource.axd?d=m8HuaqPYLmzk_UowATGkDX-O9aChdqOof5uTooTVtSHcyrMcV8ntTntRgD92n1YaI9VBs2mZBYD1JR0kt803GUDBQtemqa3fUePbK6F-lHA1&amp;t=634224162214550464" width="0" height="0" style="border-width:0px;">

When I removed this image, the space is remove, so what is the reason for it ?!

FIX

There is an easy fix to it by setting the SkipLinkText property of the menu equal to ”” (empty string) will stop the menu control from rendering the accessibility feature and Safari, Chrome and IPhone’s and IPod’s mobile Safari browsers (my headache) will stop adding that 15px on the top of the menu.

Hope it helps

1 comment: