Issue #2 is easy to fix. Add this CSS rule to your stylesheet:
ul#Top-Nav {
display: inline-block;
}
Issue #1 is almost as simple. It's more CSS changes. Because your submenu descents from the <li> but not the <a>, you need to change your CSS rules that involve a:hover and a:active:
ul#Top-Nav li:hover a{color:#1E90FF;text-decoration:none;}
ul#Top-Nav li:hover a{background:#1E90FF url(arrow.png) no-repeat right center;color:#fff;}
ul#Top-Nav li:active a{background:#1E90FF url(arrow.png) no-repeat right center;color:#fff;}
This works for me, at least on Chrome. You may (read: probably) will have issues on other browsers, where the :hover and :active pseudo-classes don't bubble up.
发布评论
评论(1)
问题 #2 很容易解决。将此 CSS 规则添加到您的样式表中:
问题 #1 几乎同样简单。更多的是 CSS 更改。因为您的子菜单源自>但不是
,您需要更改涉及
a:hover
和a:active
的 CSS 规则:这对我有用,至少在 Chrome 上是这样。您可能(阅读:可能)在其他浏览器上会遇到问题,其中
:hover
和:active
伪类不会冒泡。Issue #2 is easy to fix. Add this CSS rule to your stylesheet:
Issue #1 is almost as simple. It's more CSS changes. Because your submenu descents from the
<li
> but not the<a>
, you need to change your CSS rules that involvea:hover
anda:active
:This works for me, at least on Chrome. You may (read: probably) will have issues on other browsers, where the
:hover
and:active
pseudo-classes don't bubble up.