我不知道为什么,但我得到这个文本显示/在<h3>
标签之外流动。我认为这与浮动有关,但我已经尝试了所有我知道的解决方案来修复它,但它们没有奏效。
这是 jsfiddle(我在 Safari 中):http: //jsfiddle.net/BJCkv/1/
HTML:
<div id="header-container">
<div class="wrapper"> <!-- has width of 940px; and aligned in middle -->
<h1>PCSA - TRAINING</h1>
<h3>Security Architecture</h3> <!-- This is the problem text -->
</div>
</div>
CSS:
#header-container {
height: 84px;
line-height: 84px;
background-color: #e0dfd9;
background-image: url(../img/header.png);
border-top: 1px solid #ccccc7;
border-bottom: 1px solid #ccccc7;
}
#header-container .wrapper {
overflow: hidden;
}
#header-container h1 {
color: #b8622b;
font-family: 'Open Sans', sans-serif;
font-size: 38px;
text-shadow: 0 1px 0 #f7f7f5;
font-weight: 600;
float: left;
background: red;
}
#header-container h3 {
color: #a5a5a4;
float: left;
font-family: 'Open Sans', sans-serif;
font-style: italic;
padding: 3px 0 3px 10px;
margin-left: 20px;
height: 30px;
border-left: 1px solid #a5a5a4;
background: yellow;
}