2011-01-13 10 views
0

テーブルの内容である理由は、行のために、インラインCSSの肥大化した使用からCSSの表レイアウト

<table style="table-layout:fixed;width:100%;" border="1" cellpadding="0" cellspacing="0" class="main_table" id="main_table"> 

    <tr> 
        <td width="20%" height="70px" align="center" id="plugins" class="step step1 clickable" step="1" onclick="javascript:getresource('1','0');"> 
         <font color="blue">Plugins</font> 
        </td> 
         <td rowspan="5" width="80%" height="100%" align="center" ><br> 
          <div id="status" class="msg" style="display:none"><br></div> 
          <div id="header_msg" height="100%" align="center"></div> 
          <div id="contents" height="100%"></div> 
          </td> 
        </tr> 

</table> 

答えて

2

削除TDのと第二のdivの両方から「= 『センター』を揃える」、そしてあなたは、データがの先頭に開始する場合:しかし、それをCSSの方法を実行することを検討してください。セルに「valign = "top"」を追加します。

<table style="table-layout:fixed;width:100%;" border="1" cellpadding="0" cellspacing="0" class="main_table" id="main_table"> 

    <tr valign="top"> 
        <td width="20%" height="70px" id="plugins" class="step step1 clickable" step="1" onclick="javascript:getresource('1','0');"> 
         <font color="blue">Plugins</font> 
        </td> 
         <td rowspan="5" width="80%" height="100%"><br> 
          <div id="status" class="msg" style="display:none"><br></div> 
          <div id="header_msg" height="100%"></div> 
          <div id="contents" height="100%"></div> 
          </td> 
        </tr> 

</table> 
0

別にHTMLテーブルを開始したところから開始するようにそれを作るためにcenter.Howから開始するように見えますレイアウトとあまり人気のないタグでは、私はそれがだと思います。

align="center" 

..あなたのコンテンツを中心にしています。その代わりに「左」に交換してください。

text-align: left;