html - 如何对齐 HTML 表格中的两个组件?
问题描述
我需要 programVersion 和 userInfo 在同一行。我该怎么做?
它目前的样子:
我尝试将它们添加到另一个表中。
<table id="sheet" width="100%" border="0">
<tr>
<td rowspan="5" width="30px"></td>
<td colspan="2"> </td>
</tr>
<tr id="headerrow">
<td rowspan="2" id="headerrow" width="300" style="border-radius: 10px 0px 0px 0px;">
<p:graphicImage url="/images/six_logo.png" />
</td>
</tr>
<tr>
<td id="app-header" style="border-radius: 0px 10px 0px 0px;">
<ui:insert name="header">
<strong style="font-size: 30px">#{i18n['application.name']}</strong>
</ui:insert>
<ui:insert name="programVersion">
<p>#{pv['ProgramVersion']}</p>
</ui:insert>
<ui:insert name="userInfo">
<div align="right">
<h:outputText value="#{loginController.userInfo}" />
</div>
</ui:insert>
</td>
</tr>
</table>
解决方案
我不知道您用于显示数据的脚本,但我认为以下可能对您有用。
div:first-child {
display: inline;
}
.first{
float: left;
}
.second{
float: right;
}
<div>
<div class="first">
0.20.r5 Version
</div>
<div class="second">
dewrf435dsfs345f65
</div>
</div>
推荐阅读
- android - 后台服务中的 Google Vision API?
- python - 如何让 Spyder 在相关输出上显示?
- image - 从 2D 图像后端创建 3D 游览
- python - Google Cloud IoT 核心 JWT 过期居然是 24 小时?
- arrays - 嵌套对象中的 Logstash 嵌套对象
- acumos - Acumos 安装和 /var/lib/docker 大小
- gcc - version-script 可以只提供没有默认值的版本化符号吗?
- git - 我对分支中的本地文件进行了更改并进行了提交,但没有推送到原点。怎样才能找回原来的文件?
- video - 如何在颤动中将视频文件上传到服务器
- vba - Outlook - 如果在本月之前发送过电子邮件,则发出警告