title: Float right all elements inside div to be in one line horizontally
body: <p>I would like to float right all elements inside <code>div</code> (text, picture and button) to be in one line horizontally using CSS. How can I achieve it? </p>
  
  <p><code>.log {float: right;}</code> floats them all as one element to the right but vertically.</p>
  
  <p>EDIT: 
  What I have:</p>
  
  <pre><code>img
  txt
  button
  </code></pre>
  
  <p><code>float: right</code> works like :</p>
  
  <pre><code>                                                                       img
                                                                         txt
                                                                         button
  </code></pre>
  
  <p>What I want: </p>
  
  <pre><code>                                                                 img text button
  </code></pre>
  
  <p>My code:
      
  
  <pre><code>$id = $_SESSION['id'];
  $st = $_SESSION['status'];
  $fileNameNew = $_SESSION['fileName'];
  
  echo '&lt;div class="log"&gt;';
  if($st == 0){
      echo "&lt;img style='width:50px;height:50px;' src='includes/uploads/".$fileNameNew."?".mt_rand()."'&gt;";
      echo "&lt;p&gt;Witaj : " .$_SESSION['uid'];
      echo "&lt;/p&gt;";
  }else{
      echo '&lt;img style="width:50px;height:50px;" src="includes/uploads/default.png"&gt;';
  }
  if (isset($_SESSION['id'])) {
      echo '&lt;form action="includes/logout.php"&gt;
          &lt;button class="logout" type="submit"&gt;Wyloguj się&lt;/button&gt;
      &lt;/form&gt;';
  }else{
      header("Location: index.php");              
  }
  echo '&lt;/div&gt;';
  ?&gt;
  </code></pre>