roman-v1 roman-v1 - 1 year ago 58
HTML Question

How to display text around box?

here is my example:, I'm trying to display red box in the right top corner, AND TEXT AROUND it, but if there too much text on the left box is moving below, if I set absolute position for box text is moving under the box, text is dynamic, because of it can't set it by margins or paddings, does anybody know a solution? Here html code:

<div class="left">asdfwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww</div>
<div class=right></div>

Answer Source

.parent {
  overflow: hidden;

.right {
    margin: 0 0 15px 15px;
    width: 200px;
    height: 200px;
    background: red;
    float: right;
<div class="parent">
  <div class=right></div>
  <div  class="left">asdfwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwww</div>