Div 未使用 css 网格正确对齐

发布于 2024-11-30 11:57:08 字数 195 浏览 5 评论 0原文

我在此页面上使用 960 网格系统,其中列出了我的 instapaper 书签:http://labs.tonyhue。 com/bookmarks/

然而,社交媒体部分与其他部分分开。它应该与编程部分之后的右侧对齐。有什么想法吗?

I'm using the 960 Grid System on this page where I list my instapaper bookmarks: http://labs.tonyhue.com/bookmarks/

However, the social media section is set off from the rest. It should be aligned to the right following the programming section. Any ideas?

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

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

发布评论

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

评论(1

白昼 2024-12-07 11:57:08

向您的 .grid_6-Container 添加(固定)高度。

.grid_6 {height:250px; /*or something else*/}

您的问题发生在不同高度的浮动元素上。

关于浮动的好读: http:// /coding.smashingmagazine.com/2007/05/01/css-float-theory-things-you-should-know/

编辑:
否则,您可以添加一个包装器元素来清除浮动:

<div class="wrapper">
     <div class="grid_6"></div>
     <div class="grid_6"></div>
</div>

<div class="wrapper">
     <div class="grid_6"></div>
     <div class="grid_6"></div>
</div>

您可以使用 .wrapper {overflow:hidden;} OR 清除浮动,您可以使用clearfix 方法: http://perishablepress.com/press/2009/12/06/new-clearfix-hack/

Add a (fixed) height to your .grid_6-Container.

.grid_6 {height:250px; /*or something else*/}

Your Problem occurs on floated elements with different height.

Nice reading about floatings: http://coding.smashingmagazine.com/2007/05/01/css-float-theory-things-you-should-know/

Edit:
Otherwise you could add a wrapper element to clear your floats:

<div class="wrapper">
     <div class="grid_6"></div>
     <div class="grid_6"></div>
</div>

<div class="wrapper">
     <div class="grid_6"></div>
     <div class="grid_6"></div>
</div>

You can clear your floats with .wrapper {overflow:hidden;} OR you can use the clearfix method: http://perishablepress.com/press/2009/12/06/new-clearfix-hack/

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