gpt4 book ai didi

html - IE7 文本对齐 :right not working

转载 作者:太空宇宙 更新时间:2023-11-04 04:43:18 24 4
gpt4 key购买 nike

我有一个 h3 和一个 h1 标签:

<div id="header">
<div class="title">
<img class="logo" src="images/logo.png" />
<h3>Title1</h3>
<h1><a href="#">Title2</a></h1>
</div><!-- end .title -->
</div><!-- end #header -->

#header {
background: transparent url(images/header_bg.png) top center no-repeat;
margin: 30px auto 0;
width: 960px;
height: 240px;
}
#header .title { float: right }
#header h1,
#header h2,
#header h3 {
text-align: right;
border: none;
padding: 0;
}

在 IE7 中,h3 会按预期正确对齐,但 h1 不会。为什么?

最佳答案

.title div 指定一个明确的宽度 - 你应该使用 IE 开发者工具(按 F12)来解决这类问题。

另请查看 this类似问题

关于html - IE7 文本对齐 :right not working,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15010859/

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