html - 复选框未左对齐
问题描述
在我的 spring 应用程序中,我使用 thymeleaf 并希望复选框左对齐。在我的模板中:
<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;
}
推荐阅读
- git - UI上的git过滤器和git rev-list命令有什么区别
- php - 防止 URL 变量不显示在 URL 中
- css - Bootstrap 模板:为所有视图使用模板
- python - 从 back4app 获取
- html - 我想将 HTML 表单字段传递给脚本中的 powershell 变量
- google-app-engine - 如何让 golang gin 与谷歌应用引擎一起工作?
- linux - PhpStorm 远程 Xdebug
- python - MSK 调制波形绘图
- mongodb - 如何将多个 MongoDB 集合的内容发送到使用 express 进行渲染的路由?
- vue.js - 如何为 Vue 组件数据指定类型、默认值和验证器