我已將div標籤添加到同一行上的文本,因爲我想添加鼠標懸停功能,但現在所有文本都在不同的行上。我如何製作它以便所有文本都在同一行上?如何在添加div標籤時將文本全部放在同一行上?
HTML:
<div style="margin-top:30px;" />
<center>
<table height="50" width="400" cellpadding="0" cellspacing="0">
<tr>
<td>
<center>
<hr size="1" color="#585858" width="82%"></hr>
</center>
<center>
<div class="about">
<font face="helvetica" size="2" color="#585858">About Us</div>
<div class="about">Accessibility</div>
<div class="about">Contact Us</div> </font></div>
<font face="helvetica" size="2" color="#585858">©2011 - Privacy
</font></center>
</center>
</td>
</tr>
</table>
</center>
CSS:
.about:hover {
font: 13px helvetica;
text-decoration: underline;
}
謝謝!
詹姆斯
謝謝!你如何在div中集中一個div? – James
給子div的顯示:內聯塊&給那裏父div文本對齊:中心; – sandeep