<div class="container">
<p>The blue element inside the white container has a left margin set. Try changing it to see how it affects the space between the element and the text next to it.</p>
<div class="parent">
<div class="element">
I have a left margin.
</div>
<p style="text-align: justify;">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cum, iste, animi magni suscipit nobis sint voluptatem asperiores sunt fugiat in enim aspernatur nostrum veritatis repellat quasi modi neque dolores aliquam.
</p>
</div>
</div>
body {
background-color: #F5F5F5;
color: #555;
font-size: 1.1em;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.container {
margin: 40px auto;
max-width: 700px;
}
.parent {
border: 2px solid black;
background-color: white;
height: 400px;
}
.element {
padding: 20px;
background-color: #0099cc;
color: white;
width: 250px;
height: 100px;
float: right;
margin-left: 30px;
}