blueprintcss,两个 Span-12 放在一个 Span-24 中?
我使用 span-24 div 作为全角页面,并且该页面内还有其他一些 span-24。但我想在主 span-24 内并排放置两个 span-12。当我尝试这个时,它们最终会叠在一起。这是我的代码 -
<div id="content" class="span-24">
<div id="main" class="span-24" role="main">
<div class="container">
<div class = "span-24">
<div id = "block_"><h2>Popular Posts</h2></div>
</div>
<div class = "span-12">
<div id = "block_"><h2>Best Users</h2></div> </div>
<div class = "span-12">
<div id = "block_"><h2>Popular Forum Posts</h2></div> </div>
</div>
</div><!-- /#main -->
I'm using a span-24 div as full-width page and i have some other span-24s inside that one. But i want to have two span-12s side-by-side inside the main span-24. When i try this, they end up on top of each other. Here is my code -
<div id="content" class="span-24">
<div id="main" class="span-24" role="main">
<div class="container">
<div class = "span-24">
<div id = "block_"><h2>Popular Posts</h2></div>
</div>
<div class = "span-12">
<div id = "block_"><h2>Best Users</h2></div> </div>
<div class = "span-12">
<div id = "block_"><h2>Popular Forum Posts</h2></div> </div>
</div>
</div><!-- /#main -->
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在第二个
span-12
上,还给它一个last
类来删除右边距。on the second
span-12
give it also alast
class to remove the right margin..将 span 设置为内联块。
Set spans to be inline-block.