0

adding margin-right causes the div element to be pushed to the left

<div style="margin-right: 50px; background-color: blue;">
  <p>This is some content inside the div element.</p>
</div>

Why if I set the width , margin-right doesn't cause the div element to be pushed to the left?

<div style="width: 500px; margin-right: 1000px; background-color: blue;">
  <p>This is some content inside the div element.</p>
</div>
InSync
  • 4,851
  • 4
  • 8
  • 30
Alvah_Franey
  • 121
  • 2
  • 6

0 Answers0