2016-09-28 76 views
1

我需要創建僅使用表網站(老式方法)。 我已經開始了佈局,因爲我只能使用tables/html,所以我遇到了一些問題。HTML - 移動文本在單元格中

<body> 

<table width="1173" height="703" cellspacing="0" cellpadding="0"> 
    <tr style="text-align:center; font-family: Arial, Gotham, 'Helvetica Neue', Helvetica, sans-serif; font-size:20px; color:white; text-transform:uppercase"> 
     <td colspan="2"></td> 
     <td width="234" height="234" style="background-color:#1e8bc3; background-image:url(images/exercice1_iconeBatterie.gif); background-repeat:no-repeat; background-position:center; display: inline-block;">Expérience</td> 
     <td width="234" height="234" background="images/exercice1_img1.jpg"></td> 
     <td width="234" height="234" style="background-color:#ff9f00">Biographie</td> 
    </tr> 

    <tr style="text-align:center; font-family: Arial, Gotham, 'Helvetica Neue', Helvetica, sans-serif; font-size:20px; color:white; text-transform:uppercase"> 
     <td width="234" height="234" background="images/exercice1_img2.jpg"></td> 
     <td width="234" height="234" style="background-color:#f05a49">Compétence</td> 
     <td width="234" height="234" background="images/exercice1_img3.jpg"></td> 
     <td width="234" height="234" style="background-color:#f86923">Portfolio</td> 
     <td width="234" height="234" background="images/exercice1_img4.jpg"></td> 
    </tr> 
     <tr style="text-align:center; font-family: Arial, Gotham, 'Helvetica Neue', Helvetica, sans-serif; font-size:20px; color:white; text-transform:uppercase"> 
     <td style="background-color:#f86923">Réseaux sociaux</td> 
     <td width="234" height="234" background="images/exercice1_img5.jpg"></td> 
     <td width="234" height="234" style="background-color:#35bc7a">Blog</td> 
     <td width="234" height="234" background="images/exercice1_img6.jpg"></td> 
     <td width="234" height="234" style="background-color:#1e8bc3">Contact</td> 
    </tr> 
</table> 

我需要我的文字到圖像下在小區的中心對齊。 當我嘗試移動某物時,顯然整個細胞都在移動。 結構會是什麼,知道我在那裏是錯的。 感謝

+0

繼承人它的一個小提琴: https://jsfiddle.net/phc6jctg/ 所有他們除了1似乎罰款?我對這個問題是什麼感到困惑? –

+0

問題是在我的細胞中心,我需要有一個小圖標(如下所示:http://imgur.com/a/xZ8bq),然後將文本對齊。 – illiaskh

+0

整件事情需要像這樣:http://imgur.com/a/obDGr – illiaskh

回答

0

基於我們評論討論:

嘗試在標題欄的TDS使用這樣的:

<img src="theimageurl.png" width="64" /><br/>Title

希望這有助於:)

相關問題