<!DOCTYPE html>
<html>
<head>
  <style type="text/css">
    #a { width: 15em; border: 1px solid black; }
    #b { float: right; width: 8em; height: 3em; background: #ccc; }
  </style>
</head>
<body>
  <div id="a">
    <div id="b">float right</div>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    <div>Long text long text long text long text long text long text long text long text long text long text long text long text long text</div>
  </div>
  
</body>
</html>