如何降低div高度 [英] how to reduce the div height
本文介绍了如何降低div高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<div class="row-fluid" >
<div class="span6">
<div class="control-group checkForError">
<label class="control-label" for="Client">Client</label>
<div class="controls">
<input style="height: 100px" type="text" name="Client" id="Client" readonly="readonly"
class="m-wrap span4 clrField" tabindex="1">
<input type="text" name="name" id="name" readonly="readonly"
class="m-wrap span8 clrField" tabindex="2">
</div>
</div>
</div>
</div>
现在我要减小div的高度.
Now I want to reduce the div height.
我尝试过最小高度,但不会降低.
I am tried with min-height but its not reduces.
如果我增加身高,它就会增加.
If I increase height it is increasing.
请帮助我
推荐答案
您需要使用max-height而不是min-height!
You need to use max-height not min-height!
div{
max-height: 100px;
height: 100%;
}
这篇关于如何降低div高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文