【发布时间】:2010-04-13 17:43:47
【问题描述】:
我对这个真的很失望。几周前,我让它在 Firefox 和 IE 中都能正常工作。今天回去做一些测试,发现Firefox的显示有问题,我一直在搜索代码但找不到任何东西。我可以使用任何愿意的人提供的一些提示,我确定我看错了。我升级了我的 firefox 版本,但我想我的代码坏了,而不是 firefox。我假设问题出在我的 css 文件中,但我不确定。
这是我迄今为止所确认的。与可能覆盖设置的
- 或
- 的其他 css 文件似乎没有冲突。另一个确认是,这在 Internet Explorer 中运行良好......因此我一定是个白痴,因为它通常是相反的(在 FF 中工作,但在 IE 中失败)。
这是它在 IE 中的外观(注意文件夹图标在文本旁边的位置):
alt text http://www.redsandstech.com/ie_works.jpg
这是它在 FF 中的样子(注意文件夹图标没有与其相应的文本一起被按下)。
alt text http://www.redsandstech.com/ff_broken.jpg这是无序列表:
<ul id="nav"> <li><a>Utah</a></li> <ul> <li><a>ParkCity</a> <ul> <li><a>Com1</a></li> <ul> <li class="folder_closed"><a>Timber</a></li> <div>SQUARE CONTAINER IS INSIDE THIS DIV</div> </ul> </ul> </ul> </ul>这是用于整个菜单的 CSS:
/* MENU NAVIGATION (<UL><LI> LISTS ****************************************/ ul#nav{ /* This handles the main root <ul> */ margin-left:0; margin-right:0; padding-left:0px; text-indent:15px; } ul#nav div{ overflow: hidden; } #nav li>a:hover { cursor: pointer; } #nav li > ul{ /* This will hide any element with an id of "nav" and an "li" that has a direct child that is a "ul" */ display:none; margin-left:0px; margin-right:0px; padding-left:15px; padding-right:0px; text-indent:15px; } #nav li { list-style-type:none; list-style-image: none; } #nav > li{ vertical-align: top; left:0px; text-align:left; clear: both; margin:0px; margin-right:0px; padding-right:0px; } .menu_parent{ background-image: url(../images/maximize.png); background-repeat: no-repeat; background-position: 0px 1px; position:relative; } .menu_parent_minimized{ background-image: url(../images/minimize.png); background-repeat: no-repeat; background-position: 0px 1px; position:relative; } .folder_closed{ position:relative; background-image: url(../images/folder_closed12x14.png); background-repeat: no-repeat; background-position: 0px -2px; } .folder_open{ position:relative; background-image: url(../images/folder_open12x14.png); background-repeat: no-repeat; background-position: 0px -2px; } </ul>
【问题讨论】: