简体   繁体   English

如何将3个HTML元素放在一行中?

[英]How to bring 3 HTML elements in one line?

My question is very similar to this question . 我的问题与这个问题非常相似。 I want to bring these 3 things in a single line : 我想将这三件事放在一行中:

<iframe src='some link' frameborder=0 height=250 width=300 ></iframe>
<div style="width:220px;padding:10px;border:5px solid gray;margin:0px;">Just Now:</div>
<iframe src='some link' frameborder=0 height=250 width=300 ></iframe>

The problem is I am doing this on a wordpress page. 问题是我正在wordpress页面上执行此操作。 I don't have access to(OR you can say I don't know how to) head part of the page. 我无权访问(或您可以说我不知道​​如何)页面的首页。 I want to put the code on the the same page(There are two tabs while publishing a wordpress page: visual and text, I want to put it in text tab.). 我想将代码放在同一页面上(发布wordpress页面时有两个选项卡:视觉和文本,我想将其放在文本选项卡中。)。 I tried few things but did not work out. 我尝试了几件事,但没有解决。 Can anyone help me in this? 有人可以帮我吗?

The structure should be: Ab box -- Text Box -- Ad box all should have equal width. 结构应为:Ab框-文本框-广告框均应具有相等的宽度。

使这些元素display: inline-block

in each 3 HTML, use float:left in style. 在每3个HTML中,使用float:left样式。

This display each box horizontally. 这将水平显示每个框。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM