Does bottom and top padding affects inline elements. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Does bottom and top padding affects inline elements.

HTML & CSS

1st Apr 2017, 12:07 AM
Safianu Mohammed
Safianu Mohammed - avatar
2 Answers
+ 5
Change display property, like this: #element { display: block: padding-bottom: 10px; padding-top: 5px; }
1st Apr 2017, 12:27 AM
Maz
Maz - avatar
0
not by itself, the block element that the inline is nested in its the one you want to adjust, the css @Maz posted will work if you want to make the inline act as a block, so depends on your needs
1st Apr 2017, 12:39 AM
William La Flamme
William La Flamme - avatar