CSS min-height

CSSWeb DevelopmentFront End Technology

<p style="">The <em>min-height property</em> is used to set the minimum height that a box can be. The value of the min-height property can be a number, a length, or a percentage.</p><h2 style="">Example</h2><pre class="prettyprint notranslate" style="">&lt;html&gt; &nbsp; &nbsp;&lt;head&gt; &nbsp; &nbsp;&lt;/head&gt; &nbsp; &nbsp;&lt;body&gt; &nbsp; &nbsp; &nbsp; &lt;p style = &quot;width:400px; min-height:150px; border:1px solid blue; padding:5px; margin:10px;&quot;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;This paragraph is 400px wide and min height is 150px &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;This paragraph is 400px wide and min height is 150px &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;This paragraph is 400px wide and min height is 150px &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;This paragraph is 400px wide and min height is 150px &nbsp; &nbsp; &nbsp; &lt;/p&gt; &nbsp; &nbsp; &nbsp; &lt;img alt = &quot;logo&quot; src = &quot;/css/images/logo.png&quot; width = &quot;100&quot; height = &quot;100&quot; /&gt; &nbsp; &nbsp;&lt;/body&gt; &lt;/html&gt;</pre>
raja
Updated on 04-Mar-2020 11:09:37

Advertisements