Jump to content

different heights


etsted

Recommended Posts

here i have a script that i run several times with a while loop bu every time the loop runs the next div has a higher margin-top than the next div

$videos .= "<div class='files' style='float:left; background:#eaeaea; width:150px; color: black;' id='file_".$id."'>n                     <a href='watch.php?f=".$file_url[0]."'><img src='$avatar' height='60' width='60' alt='$titel'> Click here</a>                                 <br>                                 <span style='float:left; text-overflow:ellipsis;'>Titel: $titel</span>n                                 <br>                                 <span>Uploaded by: <a href='user.php?u=$username'>$username</a></span>                                 <br>                                 <br>                               </div>n <br> <br>n";
Link to comment
Share on other sites

There could be a lot of reasons for that, but one thing to note is that divs are block level elements, so they'll stack vertically by default.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...