CSS Box Model | Sololearn: Learn to code for FREE!

0

CSS Box Model

Why does Padding, Border, and Margin give the same output?: #margin { padding-left: 50px; } -------------------- #margin { margin-left: 50px; } -------------------------- #margin { border-left: 50px; } What is the reason? My text is still aligned at the same place. I thought that they were different.

4/12/2020 3:52:21 PM

Koopa Scripter

4 Answers

New Answer

+5

It's a selector for the class ".wp" and ".wwp" that has <div> as their parent

+4

Add background color so you can see everything clearly https://code.sololearn.com/W35ej413geBk/?ref=app

+2

Hi Koopa first, tanks for your question due to it cuz i search for it and know something more😉 Margin is the outer space of an element, whilepadding is the inner space of an element and border is an outer space that can be colored

0

Mirielle Thank you for the code example. But what do you mean with div > .wp