Html 复选框未左对齐
在我的spring应用程序中,我使用thymeleaf,并希望复选框左对齐。 在我的模板中:Html 复选框未左对齐,html,thymeleaf,Html,Thymeleaf,在我的spring应用程序中,我使用thymeleaf,并希望复选框左对齐。 在我的模板中: <div class="container"> <h3 th:text="*{title}"/> <form method="post" action="#" th:object="${user}" th:action="@{/user}"> <table cellspacing="10">
<div class="container">
<h3 th:text="*{title}"/>
<form method="post" action="#" th:object="${user}" th:action="@{/user}">
<table cellspacing="10">
<tr align="left">
<td align="right"><label for="active">Active</label></td>
<td align="left"><input type="checkbox" align="left" placeholder="active" id="active"
th:field="*{active}"
th:readonly="${isView}"/></td>
</tr>
<tr>
<td><input type="hidden" id="created" th:field="*{created}"/></td>
</tr>
</table>
<input th:type="${isView} ? hidden : submit" value="Submit"/>
</form>
</div>
活跃的
正如您所看到的,我使用了align=left
,但它没有帮助
试试这个:
input:not([type="checkbox"]) {
width: 300;
}
在以下情况下使用
colspan
属性:
<td colspan="2">
<label for="active">Active</label>
<input type="checkbox" align="left" placeholder="active" id="active" th:field="*{active}" th:readonly="${isView}"/>
</td>
活跃的
现在,在复选框中添加标签。这没用