I am having issues making this work within my website. I have 3 columns in CSS. I am using the class of one_third for the first two columns and one_third column_last for the final column. I have multiple rows:
<div class="one_third">
<img src="images/content/about-grow.jpg" alt="" />
<h4>Grow a Garden</h4>
<p>Sed posuere consectetur est at lobortis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sed odio dui. sed.</p>
</div>
<div class="one_third">
<img src="images/content/about-wildlife.jpg" alt="" />
<h4>Protect Wildlife</h4>
<p>Sed posuere consectetur est at lobortis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sed odio dui. sed.</p>
</div>
<div class="one_third column_last">
<img src="images/content/about-volunteer.jpg" alt="" />
<h4>Volunteer</h4>
<p>Sed posuere consectetur est at lobortis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sed odio dui. sed.</p>
</div>
Here is my php. It is only outputting two columns as of now. I cannot figure out how to make the last column output correctly. Please help!
<?
include("includes/connect.php");
$staff = mysql_query("SELECT * FROM programs ORDER BY title ASC");
$numrows=@mysql_num_rows($staff);
if($numrows != 0) {
while ($result_staff = mysql_fetch_array($staff)) {
?>
<?
if ($result_staff['image'] == "") {
?>
<div align="center" style="padding-bottom:2%" class="one_third">
<a href="images/content/<? echo $result_staff['image2']; ?>" class="fancybox" title="<? echo $result_staff['name']; ?>"><img src="images/content/<? echo $result_staff['image2']; ?>" alt="<? echo $result_staff['name']; ?>" border="1" /></a><br /><h4><? echo strtoupper($result_staff['title']); ?></h4><p><? echo $result_staff['content']; ?></p>
</div>
<? } else { ?>
<div align="center" style="padding-bottom:2%" class="one_third">
<a href="images/content/<? echo $result_staff['image']; ?>" class="fancybox" title="<? echo $result_staff['name']; ?>"><img src="images/content/<? echo $result_staff['image']; ?>" alt="<? echo $result_staff['name']; ?>" border="1" /></a><br /><h4><? echo strtoupper($result_staff['title']); ?></h4><p><? echo $result_staff['content']; ?></p>
</div>
<? } ?>
<? } } ?>