简体   繁体   English

Wordpress CSS菜单错误-下拉

[英]Wordpress CSS Menu Bug - Drop Down

I have a problem with my CSS at the moment. 我的CSS目前有问题。 I am using wordpress and I am creating my own theme, when I came to create the navigation menu I am having a problem with making the menu Horizontal, with child pages and have it click-able. 我正在使用wordpress并创建自己的主题,当我创建导航菜单时,我在将菜单设置为水平,带有子页面并使其可单击时遇到了问题。 As it is I cannot hover on child pages. 因为它是我不能悬停在子页面上。

http://www.ryansammut.info/mbf/ http://www.ryansammut.info/mbf/

Has any one encountered the same problem, and how do you think it can be solved? 有没有人遇到过同样的问题,您如何解决?

Update: 更新:

I had used a different CSS Menu to fix this. 我使用了其他CSS菜单来解决此问题。

You are floating a div and giving a width of 100% which is basically same as nothing happened except that you need to clear it. 您正在浮动一个div并给出100%的宽度,该宽度基本上没有任何变化,只是需要清除它。 Set width to width:auto; 将宽度设置为width:auto; .

Add <div class="clear"></div> where your floats should end. <div class="clear"></div>到浮动结尾处。

and in css: 并在CSS中:

.clear {clear:both;height:1px;font-size:1px;line-height:1px;}

Also note that width:100% will still count + padding + margin + border to the total width. 另请注意,width:100%仍将计算+填充+边距+边框到总宽度。

This is what I would try from this code. 这就是我将从这段代码中尝试的方法。 Otherwise show us an example. 否则给我们举个例子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM