没有不值得去解决的问题,也没有不值得去学习的技术!

Solution for the Last Character Overflow in IE6!

Solution for the last character overflowing in IE6!

作者:

在

Solution for the last character overflowing in IE6!
Solution for the last character overflowing in IE6!

HTML code:

<div>
<img src=”http://www.lassaquarium.com/tpl/lassaquarium/images/about/qq.jpg” width=”167″ height=”30″ alt=”QQ客服 609200709″>
<img src=”http://www.lassaquarium.com/tpl/lassaquarium/images/about/phone.jpg” width=”204″ height=”30″ alt=”咨询电话 076022283438″>
<div>工厂地址 广东省 中山市 小榄镇 九洲基 第二工业区 兴洲路 乐事水族</div>
</div>

CSS code:

.main-con .address {
width: 594px;
float: left;
height: 50px;
line-height: 50px;
color: #656565;
font-weight: bold;
font-size: 16px;
padding-left: 106px;
overflow: hidden;
}

Modify the CSS code to:

.main-con .address {
float: left;
height: 50px;
line-height: 50px;
color: #656565;
font-weight: bold;
font-size: 16px;
padding-left: 106px;
overflow: hidden;
}

That is, remove its width value. To ensure a line break, the width of the previous line must exactly fill the available space. That’s all there is to it!

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系