html - 在 asp.net 中制作表单的样式表

标签 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>

最佳答案

将你的 th 设为 th colspan ='3'

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

关于html - 在 asp.net 中制作表单的样式表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8570366/

相关文章:

html - 为什么带有滚动条的列表将一个元素分成两行

jquery - 堆叠 jQuery CSS 声明在 IE8 中不起作用

javascript - 可查看的内容按设定的时间间隔更改 - 但之前的内容会在之后闪烁到 View 中

javascript - 如何用相似的js代码控制多个表单域

javascript - 将其他div推到右边

html - 如果 HTML 中的 ID 应该是唯一的,为什么有时我会在 Css 中看到类似 div#nav-blue 的东西?

html - Flexbox 调整内容即

css - 组中第一个 btn 上的 Bootstrap CSS 边框半径

javascript - 如何在不重新加载页面的情况下刷新 .one() 事件?

php - 以 3 个 block 显示数据库内容