浮动问题 - 并排放置div [英] Problems with float - place divs side by side

查看:166
本文介绍了浮动问题 - 并排放置div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我想两个在同一级别有两个绿色箭头。现在右箭头出现低于左箭头;我使用(内联浮动):

I would like two have the two green arrows in the same level. Right now the right arrow appears lower than the left arrow; I am using (inline floating):

<div class="span6" style="float: right; " >

我也想要有 12345

I also would like to have the text 12345 right in the center of the two arrows.

这里是代码: http://jsfiddle.net/8E9aB/2/ - 我正在使用引导css。

Here is the code: http://jsfiddle.net/8E9aB/2/ - I am using bootstrap css.

推荐答案

p>可能的副本: CSS:将divs / center / right inside header

我已更新您的jsFiddle可能的解决方案: http://jsfiddle.net/8E9aB/3/

I have updated your jsFiddle with a possible solution: http://jsfiddle.net/8E9aB/3/

我的回答是基于:http://stackoverflow.com/a/11570931/700926 ,其解释得很好。

My answer is based on: http://stackoverflow.com/a/11570931/700926 which explains the solution quite well.

- UPDATE

-- UPDATE

由于您正在使用twitter bootstrap,另一个解决方案可能已经使用内置网格系统来完成更多或更少的同样的事情 - 请在此处查看: http://twitter.github.com/bootstrap/scaffolding。 html#gridSystem

As you are using twitter bootstrap, another solution could have been using the build-in grid system to accomplish more or less the same thing - take a look at it here: http://twitter.github.com/bootstrap/scaffolding.html#gridSystem

这篇关于浮动问题 - 并排放置div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆