我在HTML中有2个表(我使用的是PrimeFaces UI Framework for Java),其中在不同表中有2个按钮,但我希望两者始终在同一行。
我将样式margin-top:100px;
添加到按钮1,现在它位于正确的位置:
但是如果出现文本框1的输入错误,则会发生:
按钮的划分:
<div class="mail_sendBtn">
<h:commandButton class="mail_sendBtn doBlock"
id="btn_send"
action="#{preEntryAccountMBean.submit}"
value="E-mail"
type="submit"
onclick = "storeMail()" />
<p:defaultCommand target="btn_send" />
按钮1的样式:
input.mail_sendBtn {
width: 300px;
height: 59px;
border-radius: 5px;
border-width: 0;
background-color: #ffa800;
cursor: pointer;
color: #FFFFFF;
font-size: 20px;
margin-top: 102px;
}
这是错误tr:
<tr>
<td colspan="2">
<h:message id="mailAddressInputMessage"
for="preEntryMailAddressInput"
class="error_message"/>
</td>
</tr>
答案 0 :(得分:0)
我修复了错误消息样式的添加问题:position:absolute;