我只是试图布置一个简单的线框,IE不喜欢我的代码。我今天一直玩很多,我的标题试图让它正确,我不确定它是什么,它确实很好。它只是显示我的导航项目,但不会跟随链接,我的图像不会显示,只显示alt标记。 Chrome和Firefox显示效果很好。有任何想法吗?这是我的标题代码,以及我的css:
HTML :
<header>
<div id="header-container">
<!-- Hidden heading for outline -->
<h1>Wordsmithery - Home</h1>
<a href="index.html"> <img src="Images/header-logo.jpg" alt="wordsmithery-logo" width="250" height="50"/> </a>
<nav>
<!-- Hidden nav heading for outline -->
<h2>Navigation</h2>
<ol>
<li><a href="news.html">News</a></li>
<li><a href="about.html">About</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="tips.html">Tips</a></li>
<li><a href="contact.html">Contact</a></li>
<li><a href="disclaimer.html">Disclaimer</a></li>
</ol>
</nav>
</div>
<div class="clearFix"></div>
</header>
CSS :
/* Header */
header{
height: 60px;
width: 100%;
background-color: #D1D1D1;
margin: 0px;
border-bottom: 5px solid #ffffff;
position: fixed;
z-index: 5;
}
#header-container{
width:940px;
height: 50px;
margin: 0 auto;
}
header img{
margin-left: 20px;
margin-top: 5px;
float:left;
}
header h1{
display: none;
}
/* Navigation */
nav{
float:left;
margin-top: 30px;
padding: 5px;
font-size: 18px;
color: black;
font-weight: 300;
}
nav h2{
display: none;
}
nav li{
display: inline;
padding-left: 10px;
}
nav li:last-child{
margin-left: 150px;
font-size: 14px;
}
nav ol {
display: inline-block;
list-style-type: none;
margin: 0px;
padding: 0px;
}
nav a {text-decoration: none; padding: 5px;}
.clearFix {clear: both;}
a:link {color:#999999;} /* unvisited link */
a:visited {color: inherit;}
a:hover {color:#ffffff;
o-transition:color .4s ease-out;
ms-transition:color .4s ease-out;
moz-transition:color .4s ease-out;
webkit-transition:color .4s ease-out;
/* ...and now override with proper CSS property */
transition:color .4s ease-out;} /* mouse over link */
a:active {color:#FFFFFF;} /* selected link */
答案 0 :(得分:0)
尝试将此添加到“head”标记中!
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->