help with looping <div>

ok so heres my problem, I am getting query results from the db and looping them into a div block but depending on the width of the broswer it will skip places when the images are different heights

example 1:

example 2:


[code] // ASSIGN AND LOOP ///////////////////////////////////////////////////////////
while ($row = mysql_fetch_array($select_p)) {

	$resultsLoopArray[] = array(
		$ezine_id = $row["id"],
		$ezine_title = $row["title"],
		$ezine_desc = $row["description"],
		$ezine_date = date("M d", $row["date"]),
		$event_mainpicture = $row["mainpicture"],
		$event_status = $row["status"],


echo '<div style="float:left; clear:none; DISPLAY: block; width: 300px; height: 100%; padding-left: 0px; padding-bottom: 30px; OVERFLOW: hidden; TEXT-ALIGN: center;"><b>' . $ezine_title . '</b><br>' . $event_status . ' on ' . $ezine_date . '<br><a href="../pictures/', $event_mainpicture, '" rel="lightbox[roadtrip]" title="', $ezine_title, '" style="cursor:url(', $cursor, ')" /><img src="../pictures/', $event_mainpicture, '" width="240" /></a>' . '<br>' . $ezine_desc . '<br><br><form method="post" action=""><input type="checkbox" value="', $ezine_id, '" name="checkbox[]" id="checkbox[]">&nbsp;Delete Record&nbsp;<input type="checkbox" value="', $event_mainpicture, '" name="deleteFile[]" id="deleteFile[]">&nbsp;Delete File<br><a href="../admin/edit_photo.php?id=', $ezine_id, '">EDIT</a><br></div>';


what i want them to do is when it starts a new row to drop down below the biggest height size so they all line up without skippin placement

heres example how i want it to look from myspace

thanks in advance for any help…

Sounds like an HTML issue to me. Have you checked out the source for the reference page you’re showing us?

I think it’s your CSS. You’re specifying display:block but what you’re achieving with float:left is decidely an inline-like display. Could this be confusing the browser? It confuses me. Then again I don’t know everything. :)

display:block and float:left are attributes of equal value afaik. style="" defined attributes take prevalence over CSS defined attributes in default browser engines I believe. Google should have the answer to that.

Sponsor our Newsletter | Privacy Policy | Terms of Service