admin管理员组文章数量:1332873
I've been tearing my hair out trying to get this fixed. I can't figure out what's going wrong. It looks fine in the Visual Editor (though I usually use the text version instead - and NEVER use Gutenburg (so this is referencing the Classic Editor).
Images aligned left or right just do not properly wrap the text. I have added the following CSS to my stylesheet, and it makes no difference.
.alignnone {
margin: 5px 20px 20px 0;
}
.aligncenter,
div.aligncenter {
display: block;
margin: 5px auto 5px auto;
}
.alignright {
float:right;
margin: 5px 0 20px 20px;
}
.alignleft {
float: left;
margin: 5px 20px 20px 0;
}
a img.alignright {
float: right;
margin: 5px 0 20px 20px;
}
a img.alignnone {
margin: 5px 20px 20px 0;
}
a img.alignleft {
float: left;
margin: 5px 20px 20px 0;
}
a img.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}
It wraps only with the paragraph it was added next to. But subsequent paragraphs do not continue the wrap. They start below the image, as seen in this screenshot:
Can anyone help me here?
I've been tearing my hair out trying to get this fixed. I can't figure out what's going wrong. It looks fine in the Visual Editor (though I usually use the text version instead - and NEVER use Gutenburg (so this is referencing the Classic Editor).
Images aligned left or right just do not properly wrap the text. I have added the following CSS to my stylesheet, and it makes no difference.
.alignnone {
margin: 5px 20px 20px 0;
}
.aligncenter,
div.aligncenter {
display: block;
margin: 5px auto 5px auto;
}
.alignright {
float:right;
margin: 5px 0 20px 20px;
}
.alignleft {
float: left;
margin: 5px 20px 20px 0;
}
a img.alignright {
float: right;
margin: 5px 0 20px 20px;
}
a img.alignnone {
margin: 5px 20px 20px 0;
}
a img.alignleft {
float: left;
margin: 5px 20px 20px 0;
}
a img.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}
It wraps only with the paragraph it was added next to. But subsequent paragraphs do not continue the wrap. They start below the image, as seen in this screenshot:
Can anyone help me here?
Share Improve this question asked Jun 25, 2020 at 18:00 Laura SageLaura Sage 2255 silver badges11 bronze badges 5 |1 Answer
Reset to default 1Your container div
for the content area has a class of .row
, which is set to display:flex
in Bootstrap. Direct children of a parent with display:flex
can't be floated.
To fix this you'll either need to update the .row
class so it's not set to display:flex
(display:block
works for me), or add an interior wrapper div so that the image and paragraphs not direct children of the .row
div.
本文标签: Image text wrap not working properly on frontend
版权声明:本文标题:Image text wrap not working properly on frontend 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742315043a2451645.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
p { margin-top: 0; margin-bottom: 1rem; }
– Laura Sage Commented Jun 25, 2020 at 20:17