2013-06-05 5 views
1

colspanrowspan에 약간 문제가 있습니다. 나는 <td>에서와 두 번째 <tr>을 넣을 때표 colspan & rowspan

<table border="1"> 
     <tr> 
     <th colspan="3"><h1>DIVING</h1></th> 
     </tr> 
     <tr> 
     <td colspan="2">col 1 row 1</td> 
     <td>col 1 row 1</td> 
     </tr> 

     <tr> 
     <td>col 1 row 1</td> 
     <td>col 1 row 1</td> 
     <td>col 1 row 1</td> 
     </tr> 


</table> 

: 나는 다음과 같은 테이블을 만들려고 노력 해요 :

enter image description here

을하지만 행 범위와 두 번째 자막에 붙어

enter image description here

답변

0

에서 다음 질문은, 그것은 두 번째가 아닌 첫 번째 자막을, 다음 4 열 (3이 아님)이있는 것처럼 보입니다. 이런 식으로 해보십시오.

<table> 
    <tr> 
     <th colspan="4"><h1>DIVING</h1></th> 
    </tr> 
    <tr> 
     <td colspan="2">col 1&2 row 2</td> 
     <td colspan="2">col 3&4 row 2</td> 
    </tr> 
    <tr> 
     <td>col 1 row 3</td> 
     <td>col 2 row 3</td> 
     <td>col 3 row 3</td> 
     <td>col 4 row 3</td> 
    </tr> 
</table> 

그때 세 번째 행을 반복하고, 마지막으로 제 2 열을 복사한다. http://jsfiddle.net/D9VxN/

+0

마법처럼 일했다! 나는 테이블이 전혀 좋지 않다. 고맙습니다 – mstroiu

관련 문제