2012-03-28 66 views
-4

我製作一個頁面。用戶看到評論。 當他們點擊「devam」url時。他們看到更多有關評論。HTML - 查看更多評論打破所有表格

enter image description here

enter image description here

但這打破錶。我想要的只是它改變了相關的評論寬度和高度。我怎樣才能做到這一點 ?

+1

你的問題是不精確指定的。如果你需要幫助,你需要給我們更多的細節 – ControlAltDel 2012-03-28 21:56:35

+0

你是什麼意思的「打破錶」? – 2012-03-28 22:07:06

回答

0

的問題是,它擴大了小區,在其他細胞的文字引起包裝以及....使用這種風格的前兩個單元格:

<td style="white-space: nowrap;">...</td> 

,或者明確地設置一個寬度他們即:

<td style="width:200px">...</td> 
0

也許這是你搜索的內容 http://jsbin.com/ejecij/2/edit

<style> 
     .date_col,.movie_col,.descr_col { 
      height:50px; 
     } 
     .date_col{width:66px} 
     .movie_col{width:100px} 
     .descr_col{width:300px} 

     .full_descr_col{ 
      width:300px; 
      height:150px; 
     } 
    </style> 
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> 
<script> 
    $(document).ready(function() { 
     init_links(); 
    }); 

    function init_links() { 

     $(".descr_col>a.fulltext").unbind().click(function() { 
      $(this).parents("td").attr("class","full_descr_col"); 
      init_links(); 
     }); 
     $(".full_descr_col>a.fulltext").unbind().click(function() { 
      $(this).parents("td").attr("class","descr_col"); 
      init_links(); 
     }); 

    } 
</script> 

<table border=1> 
    <tr> 
     <td class="date_col">date</td> 
     <td class="movie_col">movie</td> 
     <td class="descr_col">description</td> 
    </tr> 
    <tr> 
     <td class="date_col">date</td> 
     <td class="movie_col">movie</td> 
     <td class="descr_col"> 

      description 

      <a href="#examplelink" class="fulltext">examplelink</a> 
     </td> 
    </tr> 
    <tr> 
     <td class="date_col">date</td> 
     <td class="movie_col">movie</td> 
     <td class="descr_col">description</td> 
    </tr> 
    <tr> 
     <td class="date_col">date</td> 
     <td class="movie_col">movie</td> 
     <td class="descr_col">description</td> 
    </tr> 
</table>