Html 幻影“;“边界”;在IE8中显示的图像的拐角处
我有一行包含在单个div中的图像。这些图像是单字文本的jpg图像(如“Home”用户点击导航到不同的页面。当我在ie8上运行站点时,每个图像的右下角都会出现一个小的水平破折号。这个破折号是活动的,因为如果我点击它,它会激活附加到图像上的动作(即出现下一个页面)。因此,它显然是图像的一部分Html 幻影“;“边界”;在IE8中显示的图像的拐角处,html,internet-explorer-8,border,Html,Internet Explorer 8,Border,我有一行包含在单个div中的图像。这些图像是单字文本的jpg图像(如“Home”用户点击导航到不同的页面。当我在ie8上运行站点时,每个图像的右下角都会出现一个小的水平破折号。这个破折号是活动的,因为如果我点击它,它会激活附加到图像上的动作(即出现下一个页面)。因此,它显然是图像的一部分 <style type="text/css"> .LeftIndent { left: 415px; position
<style type="text/css">
.LeftIndent
{
left: 415px;
position: relative;
}
#Tagline
{
float: left;
width: 433px;
}
#Body
{
float: left;
width: 732px;
}
#TotalPage
{
width: 1280px;
margin-left: auto;
margin-right: auto;
border-left-style: solid;
border-left-color: #5E91A8;
border-left-width: 15px;
border-right-color: #5E91A8;
border-right-width: 15px;
border-right-style: solid;
}
</style>
奇怪的是,图像文件本身没有任何边框。它是白色背景上的文本。其余99%的周长是“干净的”(即没有显示幻影边框)。显示此破折号的正是底部边缘的最右端
<style type="text/css">
.LeftIndent
{
left: 415px;
position: relative;
}
#Tagline
{
float: left;
width: 433px;
}
#Body
{
float: left;
width: 732px;
}
#TotalPage
{
width: 1280px;
margin-left: auto;
margin-right: auto;
border-left-style: solid;
border-left-color: #5E91A8;
border-left-width: 15px;
border-right-color: #5E91A8;
border-right-width: 15px;
border-right-style: solid;
}
</style>
当我在Firefox中运行该站点时,一切都很好(没有破折号)。我读了一些关于ie bug的文章,但在ie8中没有看到这一点。我尝试了clearfix,但它没有做任何事情
<style type="text/css">
.LeftIndent
{
left: 415px;
position: relative;
}
#Tagline
{
float: left;
width: 433px;
}
#Body
{
float: left;
width: 732px;
}
#TotalPage
{
width: 1280px;
margin-left: auto;
margin-right: auto;
border-left-style: solid;
border-left-color: #5E91A8;
border-left-width: 15px;
border-right-color: #5E91A8;
border-right-width: 15px;
border-right-style: solid;
}
</style>
以下是相关代码。问题出现在div id导航按钮中:
<style type="text/css">
.LeftIndent
{
left: 415px;
position: relative;
}
#Tagline
{
float: left;
width: 433px;
}
#Body
{
float: left;
width: 732px;
}
#TotalPage
{
width: 1280px;
margin-left: auto;
margin-right: auto;
border-left-style: solid;
border-left-color: #5E91A8;
border-left-width: 15px;
border-right-color: #5E91A8;
border-right-width: 15px;
border-right-style: solid;
}
</style>
谢谢
<style type="text/css">
.LeftIndent
{
left: 415px;
position: relative;
}
#Tagline
{
float: left;
width: 433px;
}
#Body
{
float: left;
width: 732px;
}
#TotalPage
{
width: 1280px;
margin-left: auto;
margin-right: auto;
border-left-style: solid;
border-left-color: #5E91A8;
border-left-width: 15px;
border-right-color: #5E91A8;
border-right-width: 15px;
border-right-style: solid;
}
</style>
<style type="text/css">
.LeftIndent
{
left: 415px;
position: relative;
}
#Tagline
{
float: left;
width: 433px;
}
#Body
{
float: left;
width: 732px;
}
#TotalPage
{
width: 1280px;
margin-left: auto;
margin-right: auto;
border-left-style: solid;
border-left-color: #5E91A8;
border-left-width: 15px;
border-right-color: #5E91A8;
border-right-width: 15px;
border-right-style: solid;
}
</style>
<style type="text/css">
.LeftIndent
{
left: 415px;
position: relative;
}
#Tagline
{
float: left;
width: 433px;
}
#Body
{
float: left;
width: 732px;
}
#TotalPage
{
width: 1280px;
margin-left: auto;
margin-right: auto;
border-left-style: solid;
border-left-color: #5E91A8;
border-left-width: 15px;
border-right-color: #5E91A8;
border-right-width: 15px;
border-right-style: solid;
}
</style>
.左缩进
{
左:415px;
位置:相对位置;
}
#标语
{
浮动:左;
宽度:433px;
}
#身体
{
浮动:左;
宽度:732px;
}
#总页
{
宽度:1280px;
左边距:自动;
右边距:自动;
左边框样式:实心;
左边框颜色:#5E91A8;
左边框宽度:15px;
右边框颜色:#5E91A8;
右边框宽度:15px;
右边框样式:实心;
}
<style type="text/css">
.LeftIndent
{
left: 415px;
position: relative;
}
#Tagline
{
float: left;
width: 433px;
}
#Body
{
float: left;
width: 732px;
}
#TotalPage
{
width: 1280px;
margin-left: auto;
margin-right: auto;
border-left-style: solid;
border-left-color: #5E91A8;
border-left-width: 15px;
border-right-color: #5E91A8;
border-right-width: 15px;
border-right-style: solid;
}
</style>
<style type="text/css">
.LeftIndent
{
left: 415px;
position: relative;
}
#Tagline
{
float: left;
width: 433px;
}
#Body
{
float: left;
width: 732px;
}
#TotalPage
{
width: 1280px;
margin-left: auto;
margin-right: auto;
border-left-style: solid;
border-left-color: #5E91A8;
border-left-width: 15px;
border-right-color: #5E91A8;
border-right-width: 15px;
border-right-style: solid;
}
</style>
您是否尝试过删除标签中每个标签周围的空白?我知道这听起来很傻,但在IE6中它肯定会解决这个问题
<style type="text/css">
.LeftIndent
{
left: 415px;
position: relative;
}
#Tagline
{
float: left;
width: 433px;
}
#Body
{
float: left;
width: 732px;
}
#TotalPage
{
width: 1280px;
margin-left: auto;
margin-right: auto;
border-left-style: solid;
border-left-color: #5E91A8;
border-left-width: 15px;
border-right-color: #5E91A8;
border-right-width: 15px;
border-right-style: solid;
}
</style>
我手头没有IE8来测试我的问题(正如你所描述的),但我在寻找一个比我在这里提出的解决方案更简单的解决方案时发现了这个问题
<style type="text/css">
.LeftIndent
{
left: 415px;
position: relative;
}
#Tagline
{
float: left;
width: 433px;
}
#Body
{
float: left;
width: 732px;
}
#TotalPage
{
width: 1280px;
margin-left: auto;
margin-right: auto;
border-left-style: solid;
border-left-color: #5E91A8;
border-left-width: 15px;
border-right-color: #5E91A8;
border-right-width: 15px;
border-right-style: solid;
}
</style>