的HTML和CSS:如何使两个股利自动相同的高度? [英] html and css: how to make two div automatically same height?
本文介绍了的HTML和CSS:如何使两个股利自动相同的高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的html代码
here''s my html code
<div id="user">
<div id="user_nav">
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
</ul>
</div>
<div id="user_content">
<ul>
<li>E</li>
<li>F</li>
<li>G</li>
<li>H</li>
<li>I</li>
</ul>
</div>
</div>
这是我的CSS代码
here''s my css code
#user {
}
#user_nav {
background-color: red;
width: 10%;
float: left;
}
#user_content {
background-color: green;
width: 90%;
float: left;
}
问题是user_nav只有3 li's,而user_content只有5 li'si.我想的是高度不会自动设置为固定高度,因为我希望它是动态的,因为li's是不固定.
the problem is the user_nav has only 3 li''s and the user_content has 5 li''s i want is that there height will be automatically the same not setting to fixed height because i want it to be dynamic because the li''s are not fixed. how would i do this?
推荐答案
尝试此 [ ^ ].
这篇关于的HTML和CSS:如何使两个股利自动相同的高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文