HTML对准唯一的问题在一台机器(包括IE8) [英] HTML Alignment Issue in one machine only (both IE8)
问题描述
我有以下的HTML和CSS code。它工作正常,在IE8在一台机器;但在第二台机器与IE8产生位置偏移。什么是为了纠正它改变?
注:错位是注销的文本
请注意:图像的尺寸为214点¯x57
请注意:这两个系统都在相同的分辨率和100%缩放。
<!DOCTYPE HTML PUBLIC - // W3C // DTD XHTML 1.0过渡// ENhttp://www.w3.org/TR/xhtml1/DTD/ XHTML1-transitional.dtd>< HTML的xmlns =http://www.w3.org/1999/xhtml><头ID =头像1><标题> Helpdsk服务管理员站点和LT; /标题><链接HREF =样式/ MasterStyle.css的rel =stylesheet属性类型=文/ CSS/>< /头><身体GT;< DIV ID =包装> < DIV ID =容器> < DIV CLASS =清除> < DIV ID =头> < DIV ID =标志> < IMG ALT =标识SRC =图像/ Logo.png/> < / DIV> < DIV ID =titleInfo> &所述a取代; Helpdsk服务管理员站点&下; / A> < DIV ID =signOut> &下;一个ID =LoginStatus1>注销&下; / A> < / DIV> < / DIV> < / DIV> < / DIV> < / DIV> < / DIV>< /身体GT;< / HTML>
MasterStyle.css
体{ 保证金:0像素;填充:0像素;文本对齐:中心;背景:橙色;}#wrapper指定{ 宽度:100%;身高:汽车;文本对齐:左;保证金:0汽车;背景:橙色;}#容器{ 宽度:850像素;身高:汽车;保证金:0汽车;背景:白色;}的#header{ 宽度:850像素;高度:70像素;背景:白色;填充:0 0 10px的0;}#titleInfo{字体:大胆18pt宋体;颜色:#2377D1;宽度:590px;高度:35px;浮动:左;保证金:10px的0 0 10px的;边框底部:固体3PX#fcda55;填充:10px的0 0 0;显示:内联;}#登出{字体:黑体宋体宋体;浮动:权利;边框底部:无;填充:0像素10px的0 0;显示:内联;}#logo{ 宽度:200像素;高度:60像素;浮动:左;保证金:0 0 0 20px的;显示:内联;填充:10px的0 0 0;}。明确{ 明确:两者;}
阅读:
- 一个div 里面的内容对齐
只要修改
< A> Helpdsk服务管理员站点和LT; / A>
要<风格=浮动:左; > Helpdsk服务管理员站点和LT; / A>
对我的作品反正(我以前有这个问题),单程即表明misallign,其他的方式,这不:
PS。如果preFER类所有的时间,只是做一个给你< A>标签。
I have the following HTML and CSS code. It works fine in IE8 in one machine; but misaligns in second machine with IE8. What is to be changed in order to correct it?
Note: The misalignment is for the "Logout" text.
Note: The dimension of the image is 214 X 57
Note: Both systems are in same resolution and 100% zoom.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1">
<title>Helpdsk Services Admins Site </title>
<link href="Styles/MasterStyle.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<div id="container">
<div class="clear">
<div id="header">
<div id="logo">
<img alt="logo" src="Images/Logo.png" />
</div>
<div id="titleInfo">
<a>Helpdsk Services Admins Site</a>
<div id="signOut">
<a id="LoginStatus1">Logout</a>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
MasterStyle.css
body
{
margin: 0px; padding: 0px; text-align: center; background: Orange;
}
#wrapper
{
width: 100%; height: auto; text-align:left; margin: 0 auto; background: Orange;
}
#container
{
width: 850px; height: auto; margin: 0 auto; background: white;
}
#header
{
width: 850px; height: 70px; background: white; padding: 0 0 10px 0;
}
#titleInfo
{
font:bold 18pt Arial; color:#2377D1; width:590px; height:35px; float:left; margin:10px 0 0 10px;
border-bottom:3px solid #fcda55; padding: 10px 0 0 0; display:inline;
}
#signOut
{
font:bold 9pt Arial;float:right;border-bottom:none;padding: 0px 10px 0 0;display:inline;
}
#logo
{
width:200px; height:60px; float:left; margin:0 0 0 20px; display:inline; padding: 10px 0 0 0;
}
.clear
{
clear: both;
}
READING:
Just change
<a>Helpdsk Services Admins Site</a>
to
<a style="float:left;" >Helpdsk Services Admins Site</a>
Works for me anyhow (I've had this issue before), one way the ie shows misallign, other way, it doesn't:
PS. If you prefer classes all the time, just make one for you <a> tag.
这篇关于HTML对准唯一的问题在一台机器(包括IE8)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!