如何在wordpress中将文本环绕在左侧浮动图像周围

发布于 2024-11-01 20:41:14 字数 258 浏览 0 评论 0原文

如果您访问 http://www.timkainu.com/journal/ 您可以看到有一些“特色图像”浮动在文本左侧。文字如何环绕图像?我已经使用 Firebug 尝试找出 CSS 的哪些部分会影响它,但显然我失败了。

该网站在 WordPress 上运行,所使用的主题名为“Striking”,可在 ThemeForest 上找到。

谢谢!

If you visit http://www.timkainu.com/journal/ you can see that there are some "featured images" floating to the left of the text. How can the text wrap around the image? I've used Firebug to try and find out what part of the CSS affects it, but I failed, obviously.

The site runs on WordPress and the theme being used is called "Striking", which is found on ThemeForest.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

满意归宿 2024-11-08 20:41:14

您将必须对主题进行一些更改才能使其正常工作。为了使文本环绕图像,文本和图像需要位于同一个容器中。在本例中,图像位于一个 DIV 中,文本位于其旁边的 DIV 中。您需要将 div.image_styled.entry_image 移动到 div.entry_info 内部才能使其工作。您可能还需要进行一些 CSS 调整,因为它的设计不是为了像这样环绕图像。

You are going to have to make some change to the theme to make that work. In order for text to wrap around an image, the text and image need to be in the same container. In this case, the image is in one DIV and the text is in the DIV next to it. You'd need to move div.image_styled.entry_image inside of div.entry_info to make it work. You would probably need to make some CSS adjustments as well since it was not design to wrap around the images like that.

全部不再 2024-11-08 20:41:14

例如,您指的是第一个项目“Costco 照片中心评论”,左侧是 Costco 的图像?

图像被包裹在


并且文本被包裹在

内,两者都被包裹在

为了使文本环绕图像,它们需要位于同一个容器中,并将图像设置为 float: left。我不确定这与 WordPress 有何关系,但就 HTML 和 CSS 而言,这就是正确的方法。

Are you referring to, for example, the first item "Costco Photo Center Review" with the image of Costco on the left?

The image is wrapped inside <div class="image_styled entry_image"></div>
and the text is wrapped inside <div class="entry_info"></div>, both of which are wrapped inside <article id="xxx" class="entry entry_left">

In order for text to wrap around the image, they need to be in the same container, with the image set to float: left. I'm not sure how this relates to Wordpress, but in terms of HTML and CSS, that's the way to go.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文