开发者

asp.net menu skiplink

The ASP.NET menu creates a skiplink which has 0x19 size and it is invisible in Explorer, but it is rendered in Chrome! So my menu has an extra 19 pixels indent! How do I overcome this? Here is its HTML:

<a href="#HeaderMenu1_Menu1_SkipLink">
<img alt="Skip Navigation Links" src="/开发者_StackOverflowWebResource.axd?d=ChOum_wTGSzbwK97BQPV0ITybaR8NYj0fCEsJDNZ46Dhv_eO5a-qipjyNL4I6aiynUitzcOuIwIjwyFX_snxVbyAZO7glY1Vhbd4zETG4j41&amp;t=634280594527374621" width="0" height="0" style="border-width:0px;">
</a>


Add SkipLinkText="" to <asp:Menu> tag and this code won't be rendered.


I haven't used the built in Menu control so did some digging and found that the default asp.net template it wraps the asp:Menu control in a div with the following styles:

<div class="clear hideSkiplink">
    <asp:Menu...

The styles are defined as:

.clear
{
    clear: both;
}

div.hideSkiplink
{
    background-color:#3a4f63;
    width:100%;
}


You can also set SkipLink = String.Empty

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜