![]() |
CSS Inline-block permits the addition of the width and height on the element. This property is used to display an element as an inline element (like <span>). The height and width properties are not affected on display: inline; property. It allows only the left and right sides of margins, not the top, and bottom. This property is commonly used to render the list items horizontally instead of vertically. Syntaxdisplay: inline-block;
Example: The example illustrates the difference between three values including inline, block, and inline-block. HTML
Output: Default Value and Inline-block valueThe default value renders the elements vertically whereas when property display with value inline-block applied all elements positioned horizontally. Example: The example illustrates comparison between the value inline-block and without value. HTML
Output Difference between Inline-block, Block and Inline
|
Reffered: https://www.geeksforgeeks.org
CSS |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 12 |