gpt4 book ai didi

html - IE7 css 帮助,为什么我的跨度不与我的内联图像垂直对齐?

转载 作者:行者123 更新时间:2023-11-28 13:43:57 25 4
gpt4 key购买 nike

我有以下html和css

<div id="header">
<div id="headerTopLeft">
<div id="areaSelect" style="display: none;">
<img id="imgHome" alt="Home" src="/Content/images/home.png" jQuery1308161709610="52" />
<span>&nbsp;</span>
</div>
</div>
</div>

<style>
#header
{
height: 75px;
}
#headerTopLeft
{
height: 75px;
padding-top: 9px;
}
#headerTopLeft
{
width: 17%;
margin-left: 1%;
float: left;
}
#areaSelect
{
height: 40px;
line-height: 27px;
margin-left: 10px;
display: none;
}
#areaSelect IMG
{
line-height: 27px;
cursor: hand;
}
#areaSelect > SPAN
{
width: 165px;
height: 27px;
line-height: 27px;
padding-right: 3px;
float: right;
display: inline-block;
}
#areaSelect SPAN.repair
{
background-image: url("images/mod_title_r.png");
background-attachment: scroll;
background-repeat: no-repeat;
background-position-x: 0%;
background-position-y: 0%;
background-color: transparent;
}
#headerTopLeft
{
margin-left: 0px;
}
#areaSelect IMG
{
line-height: 27px;
}

</style>

我希望跨度和图像垂直对齐。这适用于 Chrome、Safari、FireFox 以及 IE8 和 IE9。 IE7 但是它不起作用。跨度被向下推到图像下方。它仍然是 float 的。我在另一个问题中读到解决方案是更改跨度的行高以匹配图像等......它没有用。请分享有关如何修复此错误的任何提示或技巧。我真的很感谢任何反馈。

它目前在 IE 7 中是这样呈现的。

 ********************************
* ******* *
* * btn * *
* ******* *
* *****************
* * span *
********************************

我忘了提到在 span 上设置类的 javascript/jQuery 代码。这是显示适当图像的内容。

干杯,~ck 在圣地亚哥

最佳答案

我在 Mac 上,无法从这里进行测试,但您是否尝试将 img float 到左侧?

关于html - IE7 css 帮助,为什么我的跨度不与我的内联图像垂直对齐?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6362536/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com