ASP.net Navigation menu component on chrome

Chrome add an extra space above the asp.net navigation. This will cause any other sizing appear incorrectly.
ASP.net navigation menu created space with the following tags - before navigation div:
<a href="#NavigationMenu_SkipLink"><img alt="Skip Navigation Links" src="/fileindexing/WebResource.axd?d=N8MsU3UA8f0iawRchB1AUk5OKK7sPLF6nHPHyLLDQz6E0RQcgRHcEUO41904E2YF7altVVG4gcCidnxIystr4GWype5AyKKN6-sFZ_9qBWg1&amp;t=634806332227812500" width="0" height="0" style="border-width:0px;" /></a>

There are 2 solution :
1. We can set as display none for them using the following style :
img[alt='Skip Navigation Links'] {
*display: none;
}

2. But using display none is not recomended since we still don't know why asp.net create the space. Instead, we can use the following style :
img[alt='Skip Navigation Links'] {
position:absolute;
left:-10000px;
top:auto;
width:1px;
height:1px;
overflow:hidden;
}


It works fine now, without any extra space on chrome.
Thanks,
Danan

No comments:

Post a Comment