Home  >  Article  >  Web Front-end  >  Things to note about min-height in css

Things to note about min-height in css

黄舟
黄舟Original
2017-07-21 09:47:501838browse

Method 1:
min-height:160px; Set the minimum height of the object box, applicable to Firefox and IE7+;
height:auto!important;

Set the height of the object box without automatic positioning , use !important to increase the priority of the lower height height positioning setting;
height:160px; Set the object height, because the upper attribute !important is used, this attribute is only recognized by IE6.
Method 2:
min-height:160px; Set the minimum height of the object box, applicable to Firefox and IE7+;
height:auto; Set the height of the object box without automatic setting;
_height:160px; Set the height of the object. This property is only recognized by IE6. Under IE6, this property overrides the auto property.

The float attribute cannot be used in the min-height container, otherwise it will be invalid. If used in a large container, float can be cleared internally last, example:

<p id="content">
  <p id="left"></p>
  <p id="right"></p>
 <p class="clear"></p>
</p>

The above is the detailed content of Things to note about min-height in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn