html - DIV tag creating new line in php -


i trying style results database when echo <div> creating new line after each result. how can force div not create new line?

.message {     border:2px solid;     background-color:white; } 

php

$user = $_session['username']; $mydb = new mysqli('localhost', 'root', '', ''); $stmt = $mydb->prepare("select * messages from_user = ?  "); $stmt->bind_param('s', $user); $stmt->execute();  $result = $stmt->get_result(); while ($row = $result->fetch_assoc()) {     echo"<div class='message'>";      echo $row['to_user'];      echo"</div>"; } 

you create new divs every time. every div default starts new line.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -