admin管理员组文章数量:1122846
I am wanting to wrap text around my image in Wordpress. I am using the latest update and I click on the image, align it left or right and it looks good in the editor. When I preview my site the text is not wrapping fully around it as it was shown in the editor. See photos. I do not know much about CSS but, I have tried searching forums and i inserted this
img.alignright { float: right; margin: 0 0 1em 1em; }
img.alignleft { float: left; margin: 0 1em 1em 0; }
img.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignright { float: right; }
.alignleft { float: left; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
in "additional CSS" under Appearance customizer. Nothing changed once adding in this code.
Any help would be great, I don't understand the difference between what the editor shows and the actual website.
I am wanting to wrap text around my image in Wordpress. I am using the latest update and I click on the image, align it left or right and it looks good in the editor. When I preview my site the text is not wrapping fully around it as it was shown in the editor. See photos. I do not know much about CSS but, I have tried searching forums and i inserted this
img.alignright { float: right; margin: 0 0 1em 1em; }
img.alignleft { float: left; margin: 0 1em 1em 0; }
img.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignright { float: right; }
.alignleft { float: left; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
in "additional CSS" under Appearance customizer. Nothing changed once adding in this code.
Any help would be great, I don't understand the difference between what the editor shows and the actual website.
Share Improve this question edited Mar 10, 2020 at 16:49 Pat J 12.3k2 gold badges28 silver badges36 bronze badges asked Mar 10, 2020 at 14:28 JACOB FERROJACOB FERRO 11 Answer
Reset to default 0This is a common occurence. Many themes provide front-end styles that they don't enqueue in the Editor, so what shows on the front end of the website doesn't exactly match what's in the Editor. The Block Editor has brought the Editor much closer to the front end view, but they'll likely never be quite exactly the same.
"Additional CSS" is the correct place to add CSS to adjust only the front end. However, the specific code you selected is outdated, meant for the Classic Editor. To affect an image in the Block Editor you're using, you would need to use
.alignright img { }
instead of
img.alignright
. It also looks from the screenshot like you may need to tweak the paragraph styles, not just the image styles. Most likely either the image is not floated, in which case you could try
.alignright img { float:right; }
or the paragraphs are cleared, in which case you could try
p { clear:none; }
but it will all depend on how your theme has structured their CSS. They may use more specific styles, or different layout types. You'll likely need to read up on CSS and inspecting elements to determine what CSS will make the layout look the way you want. Alternatively, you could try other themes to see if there's one that more closely matches the Editor.
本文标签: imagesText Wrapping in Editor not Matching Website View
版权声明:本文标题:images - Text Wrapping in Editor not Matching Website View 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736283073a1926847.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论