IE8不选择“向左浮动”和“字体” [英] IE8 Not picking up 'Float Left' and 'Fonts'

查看:158
本文介绍了IE8不选择“向左浮动”和“字体”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我的网站工作正常,除了在IE8。菜单栏未正确显示。我的理论是浮动左不工作,但它可以是别的东西。此外,Calibri的字体没有正确显示。有没有办法解决这两个问题。该网站是 eagleview.it

Hey my site is working fine except in IE8. The Menu bar is not displayed properly. My theory is the Float Left is not working but it could be something else. Also the font which is Calibri isn't showing up properly. Is there any way to fix these two problems. The website is eagleview.it

这是nav ul index.css:

This is the nav ul for index.css:

nav ul {
width:900px;
list-style: none; 
margin:15px;
position: relative;
}
nav ul li { display::inline;}
nav ul li a {
float:left;
display: block;
padding: 0 15px;
margin: 10px 12px;
color:#fff;
font-weight:600;
font-size:15px;
opacity:1;
}


推荐答案

ie8无法识别 nav作为元素。

ie8 doesn't recognise "nav" as an element.

最简单的选项是更改为div或检查modernizr。

Simplest option is to change to a div, or check modernizr out.

<div id="nav">
        <ul class="group">
            <li style="font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif"><a href="about.html" style="text-decoration:none">About</a></li>
            <li style="font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif"><a href="services.html" style="text-decoration:none">Services</a></li>
        <li style="font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif"><a href="testimonials.html" style="text-decoration:none">Testimonials</a></li>
           <li style="font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif"><a href="eagleview.html" style="text-decoration:none">Eagleview</a></li>
            <li style="font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif"><a href="contact.html" style="text-decoration:none">Contact</a></li>
          <li style="font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif"><a href="consulting.html" style="text-decoration:none">Consulting</a></li>
         </ul>
    </div>

使用css

#nal ul li {}
#nav ul li a {}

etc

这篇关于IE8不选择“向左浮动”和“字体”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆