asp.net 菜单跳过链接
ASP.NET 菜单创建一个大小为 0x19 的跳跃链接,它在资源管理器中不可见,但在 Chrome 中呈现!所以我的菜单有一个额外的 19 像素缩进!我该如何克服这个问题?这是它的 HTML:
<a href="#HeaderMenu1_Menu1_SkipLink">
<img alt="Skip Navigation Links" src="/WebResource.axd?d=ChOum_wTGSzbwK97BQPV0ITybaR8NYj0fCEsJDNZ46Dhv_eO5a-qipjyNL4I6aiynUitzcOuIwIjwyFX_snxVbyAZO7glY1Vhbd4zETG4j41&t=634280594527374621" width="0" height="0" style="border-width:0px;">
</a>
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="/WebResource.axd?d=ChOum_wTGSzbwK97BQPV0ITybaR8NYj0fCEsJDNZ46Dhv_eO5a-qipjyNL4I6aiynUitzcOuIwIjwyFX_snxVbyAZO7glY1Vhbd4zETG4j41&t=634280594527374621" width="0" height="0" style="border-width:0px;">
</a>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我没有使用内置的 Menu 控件,因此进行了一些挖掘,发现默认的 asp.net 模板将
asp:Menu
控件包装在具有以下样式的 div 中:样式定义为:
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:The styles are defined as:
您还可以设置 SkipLink = String.Empty
You can also set SkipLink = String.Empty
将
SkipLinkText=""
添加到
标记中,此代码将不会呈现。Add
SkipLinkText=""
to<asp:Menu>
tag and this code won't be rendered.