这是我为网页中的一个部分所拥有的 HTML。我在 CSS 中犯了一些错误,但我无法弄清楚那到底是什么......
<div id="publications">
<div id="singlepublication">
<div id="pubthumb"><a href="#"><img src="siteimages/imagetest.jpg" height="140px" width="100px"></a></div>
<div id="pubheading">Photography by Waruna Gomis</div>
<div id="pubdesc"> <p>This is a book about the architectural photography done by Architect Waruna Gomis <p></div>
<div id="publink"> Link or Buy the Publication </div>
</div>
<div id="singlepublication">
<div id="pubthumb"><a href="#"><img src="siteimages/imagetest.jpg" height="140px" width="100px"></a></div>
<div id="pubheading">Photography by Waruna Gomis</div>
<div id="pubdesc"><p>This is a book about the architectural photography done by Architect Waruna Gomis </p></div>
<div id="publink"> Link or Buy the Publication </div>
</div>
<div id="singlepublication">
<div id="pubthumb"><a href="#"><img src="siteimages/imagetest.jpg" height="140px" width="100px"></a></div>
<div id="pubheading">Photography by Waruna Gomis</div>
<div id="pubdesc"><p>This is a book about the architectural photography done by Architect Waruna Gomis </p></div>
<div id="publink"> Link or Buy the Publication </div>
</div>
</div>
而且我一直无法为其添加一些适当的 CSS:
#publications {
width: 798px;
height: 720px;
}
#singlepublication {
float: left;
height: 150px;
width: 789px;
border: #FFF thin solid;
padding: 2px;
margin-left :3px;
margin-top: 2px;
}
#pubthumb {
position: absolute;
float: left;
width: 100px;
height: 140px;
padding: 5px 10px 5px 10px;
border-right:#CCC thin solid;
}
#pubheading {
position: absolute;
float: left;
color: #FFF;
font-family: "Century Gothic", Arial, Helvetica, sans-serif;
font-size:16px;
padding: 15px 10px 10px 10px;
margin-left: 5px;
border-bottom: #999 thin solid;
width: 650px;
}
#pubdesc {
float: left;
position: absolute;
padding: 5px;
margin-left: 5px;
width: 789px;
}
#pubdesc p {
color: #FFF;
font-family: "Century Gothic", Arial, Helvetica, sans-serif;
font-size: 10px;
}
#publink {
float: left;
}
我真的不明白这里出了什么问题......任何帮助将不胜感激。