只是想知道如何摆脱标题中不必要的外观空间。我希望我的标题看起来类似于捕获 2(第二张图片),但有一些我似乎无法摆脱的不必要的空间。我通过 jsfiddle 运行它:http: //jsfiddle.net/yT6h6/即使我认为代码没有任何问题,我仍然可以看到空格。请看看这个,如果你能帮助我,我们将不胜感激。
HTML 代码:
<div class="content">
<div class="heading"><b style="font-size:14px; font-family:'Arial', Gadget, sans-serif"><b style="font-size:9px;"><a href="default.html" class="link5">Home \\</a> <a href="current_students.html" class="link5">Current Students \\</a></b>
</b>
<br />FBE Degrees & Electives
<br>
<span class="style11">FBE Degrees & Other Courses for FBE students including Elective courses</span>
</div>
CSS 代码:
.heading {
height: auto;
width: 525px;
background-color: #333333;
font-family:"Courier New", Courier, monospace;
font-size: 28px;
color: #DBDBDB;
padding-left: 30px;
font-weight: bold;
padding-top: 5px;
margin-top: 5px;
padding-bottom: 5px;
padding-right: 20px;
background-repeat: no-repeat;
background-position: left center;
}
.content {
height: auto;
float: left;
width: 575px;
background-repeat: repeat;
background-color: #FFFFFF;
}
.style11 {
font-size: 10px;
font-family: Arial, Helvetica, sans-serif;
line-height: 15px;
color: #336666;
}
a.link5:link {
color: #FFFFFF;
}
a.link5:visited {
color: #FFFFFF;
}
a.link5:hover {
color: #E9E8C7;
}
a.link5:active {
color: #E9E8C7;
}