Does margin-top or margin-bottom have an effect on inline elements? #212
-
In short. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Top and bottom margins do not affect inline elements because inline elements flow with content on the page. You can set left and right margins/padding on an inline element but not top or bottom because it would disrupt the flow of content. You can set margins on block (or inline-block but it will |
Beta Was this translation helpful? Give feedback.
-
No, it doesn’t affect the inline elements. Inline elements flow with the contents of the page. |
Beta Was this translation helpful? Give feedback.
-
Top and bottom margins do not affect inline elements because inline elements flow with content on the page. You can set left and right margins/padding on an inline element but not top or bottom because it would disrupt the flow of content. You can set margins on block (or inline-block but it will only look right if you set the vertical align right) because block level elements disrupt the flow of content. |
Beta Was this translation helpful? Give feedback.
Top and bottom margins do not affect inline elements because inline elements flow with content on the page. You can set left and right margins/padding on an inline element but not top or bottom because it would disrupt the flow of content. You can set margins on block (or inline-block but it will