创建标题css问题 [英] creating header css problem
问题描述
我想将此图片用作我网站的标头,但iam面临与浏览器兼容的问题,它看起来不像我想在IE中,而它在chrome中看起来还可以,请确保我将图片分成了一部分,我得到了一个和herf作为imag和第二个div,我将其作为背景色
这是镀铬的外观
http://www.4shared.com/photo/IifrVQyF/chrome.html? [ ^ ]
这是IE中的外观
http://www.4shared.com/photo/dDi_KlKS/IE_online.html? [ ^ ]
这就是我的做法
I want to use this pic as header to my website but iam facing problem with compatibly with browser its not look like i want in IE while its look okay in chrome for sure i split the picture in to part i got one and herf as imag and the second div i give it as background color
here is how its look like in chrome
http://www.4shared.com/photo/IifrVQyF/chrome.html?[^]
here is how its look like in IE
http://www.4shared.com/photo/dDi_KlKS/IE_online.html?[^]
and here is how i am doing it
<html>
<head>
<title>Untitled Document</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<style type="text/css">
@import"style.css";
</style>
</head>
<body bgcolor="#CCCCCC">
<div id="HeaderLeftDiv"></div>
<div id="HeaderRightDiv">
<ul>
<li class="current_page_item"><a href="index.php">Home</a></li>
<li><a href="#">Photos</a></li>
<li><a href="RegistrationForm.php">Register</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
</body>
</html>
这是css文件
here is the css file
.HeaderLeftDiv
{
border:"1";
position:absolute;
top:12px;
left:19%;
width:22%;
height:13%;
background:url(Images/Img1.png);
}
.HeaderRightDiv
{
position:relative;
top:36px;
left:40%;
width: 40%;
height: 54px;
margin-right: 100px;
border:3px;
background-color:#000;
}
推荐答案
看来您的右侧divmargin
正在产生问题...
请尝试如下修改CSS ...
Hi, it seems your Right Side divmargin
is creating problem...
Please try modifying your CSS as below...
.HeaderRightDiv
{
position:relative;
top:36px;
left:40%;
width: 40%;
height: 54px;
margin-right: 100px;
border:3px;
background-color:#000;
margin-top: 0;
}
.HeaderRightDiv ul
{
margin-top: 0;
}
.HeaderRightDiv ul li
{
margin-top: 0;
}
.HeaderRightDiv a
{
margin-top: 0;
}
希望这会有所帮助...
Hope this will help...
这篇关于创建标题css问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!