Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html TD上的CSS不起作用。HTM:Struts2主题=简单_Html_Struts2 - Fatal编程技术网

Html TD上的CSS不起作用。HTM:Struts2主题=简单

Html TD上的CSS不起作用。HTM:Struts2主题=简单,html,struts2,Html,Struts2,为什么我的CSS不起作用 <!--Struts2 log-in--> <form id="login" name="login" action="/springtest/login.action" method="POST"> <tr> <td> UserName:<input type="text" name="userName" maxlength="20" value="" id=

为什么我的CSS不起作用

<!--Struts2 log-in-->
<form id="login" name="login" action="/springtest/login.action" method="POST">  

    <tr>

        <td>
            UserName:<input type="text" name="userName" maxlength="20" value="" id="login_userName"/>
        </td>

        <td class="errorMessage">
            Username must not be blanks. 
        </td>
    <br>
    </tr>

    <tr>

        <td>
            PassWord:<input type="password" name="password" maxlength="20" id="login_password"/>
        </td>

        <td class="errorMessage">
            Password must not be blanks. 
        <td>
            <br>
    </tr>
    <tr> 
        <td>
            <input type="submit" id="login_0" value="Login"/>

        </td>
    </tr>
</form>

如果您使您的HTML有效(您没有
标记,一个
未关闭,

出现在不应该出现的地方等),它将工作-


用户名:
用户名不能为空。
密码:
密码不能为空。

lol!呵呵呵呵,我没看见那只像昨天一样呵呵。。谢谢男人:)
.errorMessage {
color: red;
font-size: 0.8em;
} 
<!--Struts2 log-in-->
<form id="login" name="login" action="/springtest/login.action" method="POST">  
    <table>
    <tr>
        <td>
            UserName: <input type="text" name="userName" maxlength="20" value="" id="login_userName "/>
        </td>
        <td class="errorMessage">
            Username must not be blanks. 
        </td>
    </tr>

    <tr>
        <td>
            PassWord: <input type="password" name="password" maxlength="20" id="login_password"/>
        </td>
        <td class="errorMessage">
            Password must not be blanks.
        </td>
    </tr>
    <tr> 
        <td colspan="2">
            <input type="submit" id="login_0" value="Login"/>
        </td>
    </tr>
    </table>
</form>