【发布时间】:2015-01-25 10:40:09
【问题描述】:
我正在学习 HTML、CSS,但遇到了问题。我想显示横幅,但横幅的内容从横幅底部溢出。我的代码生成这个:
我希望它看起来像这样:
.
我的代码哪里有问题?
#banner4 {
background-color: #e0e0e0;
margin-left: 3.6%;
border-left: solid;
border-width: 7px;
border-color: #0099FF;
width: 92%;
border-radius: 7px;
}
#banner4Tekst {
padding: 30px;
float: left;
}
#banner4Naslov {
font-family: Times New Roman;
font-size: 30px;
}
#banner4Podnaslov {
font-family: Times New Roman;
font-size: 17px;
}
#banner4BT {
background-color: #0099FF;
padding: 8px;
border: none;
border-radius: 4px;
color: white;
font-family: Cambria;
}
#banner4Button {
margin-left: 55%;
padding-top: 40px;
}
<div id="banner4">
<div id="banner4Tekst">
<p id="banner4Naslov">This is the fourth banner!</p>
<p id="banner4Podnaslov">Why not try our services today, you won't regret your choice!</p>
</div>
<div id="banner4Button">
<button id="banner4BT">CONTACT US TODAY</button>
</div>
</div>
【问题讨论】:
标签: html css background position