Skip to content

Does margin-top or margin-bottom have an effect on inline elements? #212

Answered by hongducdev
montasim asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by montasim
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants