IE8 Not picking up 'Float Left' and 'Fonts'

北战南征 提交于 2019-12-13 02:57:35

问题


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

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;
}

回答1:


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

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>

With css of

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

etc



来源:https://stackoverflow.com/questions/10441951/ie8-not-picking-up-float-left-and-fonts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!