<div class="container">
  <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s...</p>
  <div class="float left">float: left</div>
  
</div>

<div class="container">
  <div class="float right">float: right</div>
  <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s...</p>
</div>

<div class="container">
  <div class="float left">float: left</div>
  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s...
</div>

<div class="container">
  <img src="https://s.cdpn.io/profiles/user/1061/80.jpg?1" alt="">
  <div class="float left">float: left</div>
  
</div>

<div class="container">
  <div class="float right">float: right</div>
  <img src="https://s.cdpn.io/profiles/user/1061/80.jpg?1" alt="">
</div>
body {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  padding: 2vw;
}
.container {
  padding: 10px;
  max-width: 30vw;
  border: 1px dashed;
  padding: 1vw;
  margin: 1vw;
  border-radius: 5px;
}

.float {
  width: 100px;
  height: 100px;
  background: #f36;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  
  &.left {
    float: left;
  }
  
  &.right {
    float: right;
  }
}

p {
  background: #380ABC;
  color: #fff;
  padding: 5px;
  line-height: 1.625;
  margin: 0;
}

img {
  padding: 5px;
  border: 2px dotted #f36;
  border-radius: 3px;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.