2011-12-20 75 views
0

我試圖模仿從頁面形式的一種形式: https://lo5.medseek.com/lfserver/UH_Pre-Registration_Form樣式表使在asp.net

但我不知道如何使表風格搭配起來,股利並沒有擴張到表標題我的標記是如下和CSS。

<div id="mainDiv"> 

      <table style="width:100%;"> 
      <tr> 
      <th> 
      <div id="headerform" class="headerform"> 
        PAtient information<p>Please enter your full legal name</div> 

.headerform 
{ 
    background-color: #009797; 
    font-family: Arial, Helvetica, sans-serif; 
    font-size: 18px; 
    font-weight: bold; 
    text-transform: uppercase; 
    color: #FFFFFF; 
} 

.headerform p 
{ 
    background-color: #009797; 
    font-family: Arial, Helvetica, sans-serif; 
    font-size: 11px; 
    color: #FFFFFF; 
    text-transform: none; 
} 


#confirmationNumber 
{ float:right; 
    width:305px; 
    position:relative; 
    top: -101px; 
    left: -7px; 
    height: 43px; 
} 

table 
{ 
} 
th,td { 
     font-family: Verdana, Arial, Helvetica, sans-serif; 
     font-size: 18px; 
     color: #000000; 
    } 
    tr { 
     border: 1px solid gray; 
    } 
    td { 
     width:200px; 
     padding:3px; 
    } 
    th { 
     background-color:#D2E0E8; 
     color:#003366 
    } 
    table { 
     border: 1pt solid gray; 
    } 


      </th> 
      </tr> 
      <tr> 
       <td> 
        Last Name<br /> 
       </td> 
       <td> 
        First Name</td> 
       <td> 
        Middle Name</td> 
      </tr> 
      <tr> 
       <td> 
        &nbsp;</td> 
       <td> 
        &nbsp;</td> 
       <td> 
        &nbsp;</td> 
      </tr> 
      <tr> 
       <td> 
        &nbsp;</td> 
       <td> 
        &nbsp;</td> 
       <td> 
        &nbsp;</td> 
      </tr> 
     </table> 



    <!-- End of Main Div--> 
    </div> 

回答

0

把你日與日合併單元格=「3」

<th colspan ='3'> 
    <div id="headerform" class="headerform"> 
     PAtient information<p>Please enter your full legal name 
    </div> 
</th> 
+0

謝謝,我想,會做,你看到的樣品頁?我正在建立表格的正確方法? – user1091438 2011-12-20 04:06:24