[英]Wrapping text around image
I am trying to get text wrap around the image in the page below. 我试图在下面的页面中围绕图像进行文本环绕。 Although the image is floated to the left the text doesn't seem to wrap around.
虽然图像浮动到左侧,但文本似乎并未环绕。
http://goo.gl/SskvJ http://goo.gl/SskvJ
I would appreciate any help 我将不胜感激任何帮助
Your .region
class has a float:left
rule that should be removed. 您的
.region
类有一个应该删除的float:left
规则。 Then you'd also need to remove the clear:both
rule on the h2 element. 然后你还需要删除
clear:both
在h2元素上的clear:both
规则。 Then you'd want to add a float:left
rule to the image on the page. 然后,您需要向页面上的图像添加
float:left
规则。
I think I found a solution. 我想我找到了解决方案。 It worked fine with me.
它对我很好。
What I've made was creating a div called content and I placed inside an img and also another div that contains text. 我做的是创建一个名为内容的div,我放在一个img和另一个包含文本的div中。 Have a look at here http://jsfiddle.net/Apfyv/
看看这里http://jsfiddle.net/Apfyv/
Hope it helps! 希望能帮助到你!
你有一个div
图像和文本,并且都向左浮动...这很好 - 但div
元素没有指定宽度 - 所以他们占用100%(块元素) - 如果你指定div
sa宽度显示在图像的右侧
看起来文本没有环绕图像,因为文本和图形都在两个单独的DIV标签中,您应该合并它们。
Add a style 添加样式
.region > img {
float: left;
}
And add display: inline-block
to #page_product #overview h2
并将
display: inline-block
添加到#page_product #overview h2
#page_product #overview h2 {
margin: 0 0 1.5em;
font-style: italic;
font-weight: bold;
font-size: 1.2em;
line-height: 1.429;
display: inline-block;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.