ActionLinks 并不总是在 FireFox 和 Safari 中工作
我最近一直在学习新的 ASP.NET MVC 框架,并且为一位在瑞典经营“轻型咖啡馆”的朋友开发了一个测试网站。 计划在进行一些最终调整并修复一些安全问题后,在一周左右的时间内发布。
昨天我将网站发布到运行 IIS 6 的网络主机,因此我要做的第一件事就是解决无扩展名 URL 的问题。 我在 Phil Haack 的博客文章 IIS 6 上的 ASP.NET MVC 演练
现在,我遇到了另一个问题,该问题在 IE7 中运行良好,但在 Firefox 3 和 Safari 中不起作用。
在网站上,我使用包含“左侧内容”和菜单的母版页。 该菜单由 ActionLink 组成。 问题是,只有第一个(最上面的)链接可以用作链接,其他链接看起来只是链接,但无法单击。 当我查看源代码时,一切看起来都很好。
有没有人遇到过解决此问题的解决方案,或者您是否知道什么会导致此行为? 演示网站的链接是 演示网站
非常感谢您的帮助,因为我希望它适用于所有浏览器。
I've been learning the new ASP.NET MVC framwork lately and I've developed a test site for a friend who runs a "light café" in Sweden. The plan is to release it within a week or so after performing some final adjustments and fixing some security issues.
Yesterday I published the site to a webhost running IIS 6, so the first thing I had to do was to fix the issue of the extensionless URLs. I did this with the help from Phil Haack's blog post ASP.NET MVC on IIS 6 Walkthrough
Now I have run into another issue that works well in IE7 but not in Firefox 3 and Safari.
On the site I use a master page containing a "left content" with a menu. The menu consists of ActionLinks. The problem is that only the first (topmost) link works as a link, the others only look like links but they're unclickable. When I view the source everything looks good.
Has anyone come across a solution that fixes this, or do you maybe know what can cause this behavior? The link to the demo site is Demo site
Help would be greatly appreciated since I want this to work on all browsers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的“主”div 被放置在“链接”div 的顶部,因此无法单击它们。
添加一个:
float: right;
#main 的 CSS 允许单击链接。
Your "main" div is being placed on top of the "links" div so they can't be clicked.
Adding a:
float: right;
To the CSS for #main allows the links to be clicked.
我会检查你的CSS文件。 如果您从包含中删除 css 文件,我认为您的链接将会起作用。
I would check your css file. If you remove your css file from your include I think your links will work.
只要删除 #main 中的position:relative 就可以了
Just remove the position: relative in #main and it'll work