[英]Is it possible, to flow a div container right next to the last line of a p?
I'm creating a wordpress template. 我正在创建一个WordPress模板。 I'm using the_content(); 我正在使用the_content(); to get the text written in the backend. 将文本写在后端。 Wordpress usually wrapps that inside a <p>
. WordPress通常将其包装在<p>
。 After the_content(); 在the_content();之后; I want to have a link (that is not written into the WYSIWYG-Editor), and that link is inside a div. 我想要一个链接(该链接未写入所见即所得编辑器),并且该链接位于div中。 Now I want the <div>
to flow right next to the p-wrapped text: 现在,我希望<div>
在p换行文本旁边流动:
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna, sed diam. <p>
Lorem ipsum dolor坐着,坐立不安,sed diam nonumy eirmod tempor invidunt ut Labore et dolore magna,sed diam。 </p>
<div>
MY LINK </div>
</p>
<div>
我的链接</div>
Thanks! 谢谢!
I didn't understand your question correctly, but I think you mean this 我无法正确理解您的问题,但我认为您的意思是
.inline { display: inline; }
<div> <p class="inline">Content is here</p> <div class="inline"><a href="">The link</a></div> </div>
you can use css display: inline and display: inline-block to do that 您可以使用CSS display:inline和display:inline-block来做到这一点
Using inline-block 使用内联块
<p style="display: inline-block;"> Content of p tag </p> <div style="display: inline-block;"> <a href="#">Content of div tag </a></div>
Using inline: 使用内联:
<p style="display: inline;"> Content of p tag </p> <div style="display: inline;"> <a href="#">Content of div tag </a></div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.