样式表在asp.net中制作表单

时间:2011-12-20 03:16:03

标签: html css

我正在尝试模仿以下页面形式: https://lo5.medseek.com/lfserver/UH_Pre-Registration_Form

但我不知道如何使表格样式匹配,div不会扩展到表格标题我的标记如下和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>

1 个答案:

答案 0 :(得分:0)

把你的th与colspan ='3'

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