Jump to content

How to prevent Echos from overlapping?


inine
 Share

Recommended Posts

Heya.

I was wondering if there is any way to force each echo into a separate box or something to prevent them from overlapping with other posts from earlier, currently when i echo text + images from the database the images and everything works as intended.

 

The problem comes up when there is maybe a line or two of text witch causes the images to spill over onto earlier echos, it started when i aligned image to the right of the text.

 

The code i use for echo looks like this.

  <?php require_once 'nconfig.php'; $data = mysql_query("SELECT * FROM etusivu order by `id` DESC ") or die(mysql_error()); while($info = mysql_fetch_array( $data )) {echo "<b>".$info['otsikko'] . "</b><br> "; echo "".$info['teksti'] . " <br>"; $file = $info['photo_name'];echo  '<div align="justify" id="container">  			<div id="thumbnail"><a href="etuploads/'. $file .'"  title="'.'"><img  src="etuthumbs/etuthumb_'.$info['id'].'.jpeg" width="282" height="158" alt="image" align="right" /></a></div>  		    <div id="info"></strong>' .'</div>		  </div><br>';echo "<b>Date:</b> ".$info['date_added'] . "<br>";echo "<a href="delete.php?id=" .$info['id'] ."">delete</a>";echo '<br/><hr/>';}?> 

So i would be happy if someone could be able to help me come up with a solution, seeing i have been stuck on this problem for a while.

Link to comment
Share on other sites

Its not echo overlapping, its the html code returned from server after php processes the page, i should validate the html code, i can already spot a misplaced closed strong tag.The returned html should be done in such a way to separate text from other html content, if it has a misplaced closing div tag for example, you might find content unexpectedly merging with other content.

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
 Share

×
×
  • Create New...