html - How to wrap text inside to different paragraphs around image inside the first paragraph (
tag). (Content is inputted using CKeditor Plugin)
问题描述
I am using CKEDITOR to input content. Whenever user sets image with property right. There is a blank space coming up. I am having an image inside a
tag. My structure is like
<p> some text
<img alt="" src="M.jpg" style="float:right;">
</p>
<p> paragraph 2</p>
I want to wrap the paragraph 2 to fill up the white space created by image on paragraph 1. Is this possible.
I want to make it look like this
Here is the actual code snippet
<p>Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.Enter each item on a new line, choose the amount of groups under<img alt="" src="/media/uploads/2018/09/27/sufs5o_fWCbPPM.jpg" style="float:right; height:1080px; width:420px">Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. .</p>
<p>s settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.Enter each item on a new line, choose the amount of groups unders settings, and click the button to generate your randomized list. Don't like the first team? Just click again until you do.Fairly pick teams without bias. No need to draw names out of a hat. No need to do a grade school style draft or put hours of thought into the most balanced teams. The most fair dividing method possible is random.</p>
解决方案
Just give style to img
tag. Also, write your paragraph content after img
tag so it can wrap around the image.
CSS Code-
img{
float: right;
}
You can also try this JSFiddle
推荐阅读
- sql - 使用前两位数字在 SQL 中分组
- solr - solr - 通过向 solr 发送请求来停止构面计算
- mysql - 如何使用 Node.js Lambda 函数与 RDS MySQL 实例交互?
- javascript - 将对象数组发送到 GraphQL
- python - Tkinter:避免将焦点移动到窗口
- objective-c - 关于实例变量、属性、实现和接口的问题
- xml - VBA:如何测试从自定义功能区启动的宏?
- reactjs - react redux reducer 无法设置获取 api 数据来存储
- c# - 如何减少执行时间?ProfileBase 的 GetPropertyValue 执行需要 40ms
- python - 具有多个值的 Scikit-learn Imputer