0

I have recently built this site with through wordpress and seem to be having some alignment issues with Internet Explorer 7.

Basically they appaering about 20 or so pixel's to the right and wondered what way to fix this? This has had me stumped for a while now and I feel like I am slowly running out of idea's.

Here is the link:

http://alleanza.co.uk

Is a screenshot needed? If so I ca post the one from the client later tonight, but It is only IE 7!?

The PHP and Html Structure I have for the list's is this:

<ul id="nav" class="clearfloat">
<li style="padding:10px 10px 0px 10px; height:20px; display:block;"><a href="http://www.alleanza.co.uk">Alleanza</a></li>
<div id="navoption"><ul><?php wp_list_pages('title_li='); ?></li></ul></div>
</ul>

Is that the correct structure? All help is appreciated..

4

1 回答 1

0

您在顶级ul菜单项中嵌套了一个 div,这可能是破坏您在 IE7 中的设计的原因,令人惊讶的是它甚至可以在其他浏览器中使用:

<ul class="clearfloat" id="nav">
    <li>Alleanza</li>
    <div id="navoption"> <ul> ... </ul> </div>
</ul>

列表项必须嵌套在您的菜单列表中。

因此,将该 div 包装在一个列表项中,它应该可以工作:

<ul id="nav" class="clearfloat">
    <li style="padding:10px 10px 0px 10px; height:20px; display:block;"><a href="http://www.alleanza.co.uk">Alleanza</a></li>
    <li><div id="navoption"><ul><?php wp_list_pages('title_li='); ?></li></ul></div></li>
</ul>

注意:注意到您使用的是 wordpress,您实际上可以在菜单的“自定义链接”选项中创建该“Alleanza”链接,因此您无需对其进行硬编码。

文档:http ://codex.wordpress.org/Appearance_Menus_Screen

于 2012-05-22T16:28:34.070 回答