div对齐问题 [英] div alignment issue
本文介绍了div对齐问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有2个div嵌套在一个更大的div中,因为
< div id =site-wrapper>
< div id =user1>< / div>
< div id =user2>< / div>
< div>
css是
#site-wrapper {
border:1px solid;
width:800px;
min-height:600px;
margin-left:auto;
margin-right:auto;
}
#user1 {
border:1px solid;
width:200px;
min-height:100px;
}
#user2 {
border:1px solid;
width:200px;
min-height:100px;
}
它们出现在另一个之下。我如何让他们在对方的同一层面上。 。
I have 2 divs nested inside a bigger div as
<div id="site-wrapper">
<div id="user1"></div>
<div id="user2"></div>
<div>
The css is
#site-wrapper{
border: 1px solid;
width: 800px;
min-height: 600px;
margin-left: auto;
margin-right: auto;
}
#user1{
border: 1px solid;
width: 200px;
min-height: 100px;
}
#user2{
border: 1px solid;
width: 200px;
min-height: 100px;
}
They are appearing one below the other. How do i get them on the same level at the side of each other.
解决方案
Float #user1
and #user2
.
这篇关于div对齐问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文