css - float +垂直对齐

标签 css css-float vertical-alignment

如何在 html/css 中实现这一点:

Client:                                               Sales person:
John Smith                                            Mike Anderson

所以基本上我需要两个垂直平铺在页面左侧的输入和右​​侧相同的输入。

最佳答案

你有尝试过吗?只需使用花车就可以了

HTML

<div class="left"></div>
<div class="right"></div>
<div style="clear: both;"></div>

CSS

.left {
   float: left;
}

.right {
   float: right;
}

如果是表格格式,最好使用表格而不是 div

关于css - float +垂直对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16080140/

相关文章:

css - "img"中 "a"的中间垂直对齐

javascript - 具有事件类的平滑滚动导航

css - 滚动 DIV 后 float 一个 DIV

CSS Stack 图片从右到左,出DIV

css - 将 float <p> 拖放到 float 父级 <div> 的底部

html - 垂直对齐 :middle problem in ie

html - Flexbox 垂直对齐不起作用

css - 如何应用CSS最小宽度和打印?

css - 为什么两个相邻的行内 block 使用的宽度超过它们的总宽度?

html - 响应式表格 Bootstrap