Bootstrap min-height
Learn bootstrap min height classes with example code. This class is used to set the height of an HTML element. The character ‘h’ indicates the height.
- h-25: sets the height of an element to 25% of its parent width.
- h-50: sets the height of an element to 50% of its parent width.
- h-75: sets the height of an element to 75% of its parent width.
- h-100: sets the height of an element to 100% of its parent width.
Example:
<div style="border: 1px solid black; height: 100px; ">
<div class="bg-primary h-25">25% Height</div>
<div class="bg-primary h-50">50% Height</div>
<div class="bg-primary h-75">75% Height</div>
<div class="bg-primary h-100">100% Height</div>
</div>
Output:
See the above code, we have created four div tags. First div has 25% height, second div has 50% height, third div has 75% height and fourth div has 100% height using the bootstrap classes.