1、如果這排文字放在table裏,這樣寫:
<table>
<td align="center"> <;!--讓td中的內容居中-->
<a href="連結到那裏">;連結字</a>
</td>
</table>
2、在css裏給這排文字定義一個類爲footer,如下:
首先在<head></head>;中設定css:
<style type="text/css">
.footer{
text-align:center //設定最下排文字居中顯示
</style>
然後在body裏插入footer(最下排的字)類的div:
<div class="footer">
<a href="連結地址">;服務條款</a>
|
<a href="連結地址">;廣告服務</a>
|
<a href="連接地址">;商務洽談</a>
|
……(同上)
</div>
2. html語言 讓文字居中的代碼是什麼方法1、現在通常用的是div+css架構。
css中的寫法是對字型加樣式:text-align:center;//居中如:居中 css爲:.jz{text-align:center;}方法2:在 content 元素外插入一個 div。設定此 div height:50%; margin-bottom:-contentheight; content 清除浮動,並顯示在中間。
html:Content here css:#floater{float:left; height:50%; margin-bottom:-120px;}#content {clear:both; height:240px; position:relative;}方法3:定位:使用了一個 position:absolute,有固定寬度和高度的 div。這個 div 被設定爲 top:0; bottom:0;。
但是因爲它有固定高度,其實並不能和上下都間距爲 0,因此 margin:auto; 會使它居中。使用 margin:auto;使塊級元素垂直居中是很簡單的。
html:Content herecss:#content { position:absolute; top:0; bottom:0; left:0; right:0; margin:auto; height:240px; width:70%;}方法4:單行上下居中,可以設定行高爲盒子高度,這樣文字就可以上下居中。即:line-height的高度要等於外面div的height。
3. 網頁文字居中的代碼是什麼