[英]Html list messing up in IE7,8,9 browsers
I have created a site for a Hebrew client. 我已经为希伯来语客户创建了一个站点。 Here is the live demo link: 这是现场演示链接:
The top row with links "About Us", "Contact", "Register", "Log In" is not showing properly in any ie browser. 在任何浏览器中,带有“关于我们”,“联系人”,“注册”,“登录”链接的第一行均未正确显示。 The icons should show on right of the text. 图标应显示在文本的右侧。 I have tried different floats and margins, paddings, but it only messes things up. 我尝试了不同的浮动,边距,填充,但是这只会使事情变得混乱。
How do I correct this code, please? 请问我如何更正此代码?
<div class="logobar">
<div class="logobar_content">
<a href="#" class="logo"></a>
<ul class="toplinks">
<li><a href="#" class="info_icon">About Us</a></li>
<li><a href="#" class="envelope_icon">Contact</a></li>
<li><a href="#" class="pen_icon">Register</a></li>
<li><a href="#" class="lock_icon">Log In</a></li>
</ul>
<div class="left">
<p class="scart">
<span>0</span>items<a href="#">Checkout</a>
</p>
<form action="post" class="search_form">
<input type="text" id="search" class="search" />
<input type="submit" id="submit" class="submit" value="" />
</form>
</div>
</div>
</div>
/*=========== LOGO BAR =========*/
.logobar {
height: 95px;
overflow: hidden;
position: relative;
margin: 0 auto;
width: 100%;
background: #f0f0f0 url(../images/logobar_repeat.png) 0 0 repeat-x;
}
.logobar_content {
width: 960px;
margin: 0 auto;
position: relative;
overflow: hidden;
}
.logo {
background: url(../images/logo.png) 0 0 no-repeat;
position: relative;
float: right;
width: 312px;
height: 71px;
margin-top: 13px;
}
ul.toplinks {
float: left;
width: 500px;
margin-top: 15px;
}
.toplinks li {
float: right;
list-style: none;
border-left: 1px solid #888;
padding: 0 13px 0 20px;
}
.toplinks li a {
padding: 0 0 0 35px;
font-family: Trebuchet MS, Arial, sans-serif;
font-size: 12px;
text-transform: uppercase;
color: #444;
text-decoration: none;
text-align: right;
}
.toplinks li a.info_icon, .toplinks li a.envelope_icon, .toplinks li a.pen_icon, .toplinks li a.lock_icon {
background: url(../images/info_icon.png) 0px 0 no-repeat;
width: 18px;
height: 15px;
}
.toplinks li a.envelope_icon {
background: url(../images/envelope_icon.png) 0 0 no-repeat;
}
.toplinks li a.pen_icon {
background: url(../images/pen_icon.png) 0 0 no-repeat;
}
.toplinks li a.lock_icon {
background: url(../images/lock_icon.png) 0 0 no-repeat;
}
.scart {
background: #eee url(../images/basket2.png) 95% 2px no-repeat;
float: right;
height: 25px;
margin: 17px 0px 0 25px;
padding: 3px 40px 0px 10px;
border: 1px solid #ccc;
}
.scart a {
float: right;
color: #ff720c;
font-weight: bold;
font-size: 14px;
margin-left: 5px;
}
.scart span {
margin-left: 4px;
}
.search_form {
float: left;
clear: left;
height: 26px;
margin-top: 20px;
background: url(../images/search_left2.png) 100% 0 no-repeat;
}
.search {
background: url(../images/search_repeat.jpg) 0 0 repeat-x;
border: none;
margin: 0 11px 0 0px;
float: right;
width: 170px;
height: 26px;
}
.submit {
background: url(../images/search_right2.png) 0 0 no-repeat;
width: 35px;
height: 26px;
float: left;
border: none;
}
Thanks. 谢谢。
It is so simple to accomplish that see the css rules below and rest you change as per your need. 完成此操作非常简单,只需查看下面的CSS规则,然后根据需要休息即可。
.toplinks li a.lock_icon {
background: url("../images/lock_icon.png") no-repeat scroll 95% 0 transparent;
}
.toplinks li a {
color: #444444;
font-family: Trebuchet MS,Arial,sans-serif;
font-size: 12px;
padding: 0 35px 0 0; // See the css padding i changed to right
text-align: right;
text-decoration: none;
text-transform: uppercase;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.