I'm creating a wordpress template. I'm using the_content(); to get the text written in the backend. Wordpress usually wrapps that inside a <p>
. After the_content(); I want to have a link (that is not written into the WYSIWYG-Editor), and that link is inside a div. Now I want the <div>
to flow right next to the p-wrapped text:
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna, sed diam. </p>
<div>
MY LINK </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
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>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.