2013-02-22 2 views
1

사실 나는 디자인하는 것이 처음이에요. 2 열html 테이블에서 colspan 나누기

  • 행 - 2 - 1 열

  • 3 행 - 나는 3 행의 설명이있는 HTML 테이블

    1. 행 1 아래에있다가 3 열

    이제 세 번째 행의 열을 균등 분할로 나누지 만 colspan을 조정할 수 없으면 어떤 코드를 사용하면 도움이 될 수 있습니까?

    <table width="100%" cellpadding="5" cellspacing="0" border="1"> 
           <tr> 
            <td align="left">Infodeep Technologies</td> 
    
            <td align="right">3 Minutes ago</td> 
           </tr> 
    
           <tr> 
            <td colspan="3" align="justify">Samsung pioneered the trend of 
             a new breed of devices, now more commonly known as 
             'phablets',smartphones that are (almost) nearing tablets in size.</td> 
           </tr> 
           <tr> 
            <td align="left">By panel.</td> 
            <td align="center">21.12%</td> 
            <td align="right">21/30</td> 
           </tr> 
          </table> 
    
  • +0

    실제 표시하려는 데이터입니까? 그렇지 않다면 레이아웃 목적으로 테이블을 사용해서는 안됩니다. DIV 등을 사용해야합니다. –

    답변

    0

    희망 사항입니다. fixed 테이블 레이아웃을 추가

    <table width="100%" cellpadding="5" cellspacing="0" border="1" > 
          <tr> 
           <td align="left" width = "50%">Infodeep Technologies</td> 
    
           <td align="right" colspan = "2">3 Minutes ago</td> 
          </tr> 
    
          <tr> 
           <td colspan="3" align="justify">Samsung pioneered the trend of 
            a new breed of devices, now more commonly known as 
            'phablets',smartphones that are (almost) nearing tablets in size.</td> 
          </tr> 
          <tr> 
           <table border = "1" width = "100%" > 
           <tr> 
            <td align="left" width = "33%" >By panel.</td> 
    
            <td align="centre" width = "33%" >21.12%</td> 
            <td align="right" width = "33%" >21/30</td> 
            </tr> 
           </table> 
          </tr> 
         </table> 
    
    +0

    그러나 세 번째 행의 열을 같은 너비로 나눕니다. –

    +0

    @NikhilAgrawal 업데이트 된 답변을 참조하십시오. – DevelopmentIsMyPassion

    +0

    이제 첫 번째 행 열이 동일한 길이로 분할되지 않습니다. –

    0

    보십시오,이 세포의 브라우저의 기본 재 크기를 오버라이드 (override) 할 필요가 있습니다.

    <table width="100%" cellpadding="5" cellspacing="0" border="1" style="table-layout:fixed"> 
         <tr> 
          <td align="left" width = "50%">Infodeep Technologies</td> 
    
          <td align="right" colspan = "2">3 Minutes ago</td> 
         </tr> 
    
         <tr> 
          <td colspan="3" align="justify">Samsung pioneered the trend of 
           a new breed of devices, now more commonly known as 
           'phablets',smartphones that are (almost) nearing tablets in size.</td> 
         </tr> 
         <tr> 
          <td align="left" col>By panel.</td> 
          <td align="center">21.12%</td> 
          <td align="right">21/30</td> 
         </tr> 
        </table> 
    
    관련 문제