Problems with float - place divs side by side [closed]

一笑奈何 提交于 2019-12-25 03:23:18

问题


Hi,

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; " >

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

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


回答1:


Possible duplicate of: CSS: Placing divs left/center/right inside header

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

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

-- UPDATE

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



来源:https://stackoverflow.com/questions/12764588/problems-with-float-place-divs-side-by-side

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!