为什么我的文字没有环绕我的图像?
也许是个愚蠢的问题,但我似乎无法让文字环绕我的图像。在编辑器中它看起来很好,所有东西都包裹在它周围,但是当我保存它时,没有包裹。
Stupid question maybe, but I cannot seem to get the text to wrap around my images. In the editor it looks fine, everything is wrapped around it, but when I save it, there is no wrapping.
example: http://www.beatinganger.com/three-reasons-for-angry-children
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
听起来您可能需要向图像添加样式,要么向左浮动,要么向右浮动 - 不能确定,因为链接已损坏。
编辑:这是因为您在#left_container p上设置了width:100%和float:left,并且您添加的图像被包装在p标签中。删除 width:100% 和 float:left 你应该可以恢复正常了。
正如 clairesuzy 所说...
It sounds like you may need to add styles to the images, either float left or float right - can't say for sure as the link is broken.
Edit: It is because you have width:100% and float:left set on #left_container p, and the images you are adding are wrapped in p tags. Remove width:100% and float:left and you should be back in business.
as clairesuzy says aswell...
将
float
放在标记上。但我建议避免在标签中编写 css,除非确实必须这样做,否则这不是一个好习惯。做在外面。您可以通过执行以下操作来定位图像:
p img{ float: left; }
(基本代码),具体取决于您赋予标签的类或 ID。Put a
float
on the<img>
tag. But I suggest to avoid writing css in the tag though, it's not good practice unless you really have to. Do it externally. You can target the image by doing,p img{ float: left; }
(basic code), depending on the class or id you've giving the tags.从
#left_container p
中删除float: left;
无需浮动所有已让图像浮动在内容内的段落,因此它是唯一需要浮动的段落用于
p
或环绕它的任何其他元素remove the
float: left;
from#left_container p
there's no need to float all the paragraphs you already have the image floating inside the content so it's the only one that needs to float for the
p
or any other element to wrap around it