Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将底部的部分向上移动到 div 的右侧,其中包括印章、段落和新闻(即:右侧的当前客户,左侧的所有其他内容。)
目前,我在 div 上使用 60% 来保存左侧的文本。我猜这就是内容。我一直在尝试将“Foo”移动到第一列的右侧。
我已经用宽度、填充和边距、对齐以及许多其他元素愚弄了。任何帮助将不胜感激。
谢谢。
砰
为您的班级entry-content添加以下 CSS:display: flex;
entry-content
display: flex;
这解决了问题。
有关更多详细信息,请查看这篇文章:如何并排放置 div
更多关于 flex 的细节在这里
您需要浮动:将两个 div 都留在 entry-content div 内:
<div class="entry-content"> <div style="width:60%;float: left;">... more code here ...</div> <div style="width:33%;float: left;">... more code here ...</div> </div>