并排div对齐 [英] Side-by-side div alignment

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

问题描述





在我的网站标题中,我有一个名为导航的div,它应该在右侧并具有自动宽度。我还有一个名为icon的div,它应该在左边,并且应该填满header的剩余宽度。请在此处查看: http://codepen.io/Rixterz/pen/KAdsr [ ^ ]



帮助!

Hi,

In my website header, I have a div called "navigation", which should be on the right and has an automatic width. I also have another div called "icon", which should be on the left and should fill up the remaining width of "header". Please see it here: http://codepen.io/Rixterz/pen/KAdsr[^]

Help!

推荐答案

在css类中添加此样式:



Add this style in css class :

display:inline;
float:left;





两者都添加......你可以按照自己的意愿设计......

:) :):)



Add it in both... And you can design as you want...
:) :) :)


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

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