Snip of code involved:
PHP Code:
<div id="left">
<-----SNIP------->
<?php echo '<div id="homewrapper"><div id="column1"><div id="home_category_heading">'.$cats[name].'</div>';
$num = 0;
while($games = mysql_fetch_array($query, MYSQL_ASSOC)){
//echo $games['title'];
$gameurl = $games['title'];
$gameurl = str_replace(" ", "-", $gameurl);
$gameurl = str_replace("'", "_", $gameurl);
$gameurl = str_replace('"', "_", $gameurl);
$gameurl = str_replace('/', "_", $gameurl);
$gameurl = str_replace("\\", "_", $gameurl);
$gameurl = rawurlencode($gameurl);
$games['description'] = stripslashes($games['description']);
$name = substr($games['title'], 0, 28);
if(strlen($games['description']) > 45){
$games['description'] = substr($games['description'], 0, 45)."...";
}
else {
$games['description'] = $games['description'];
}
if($num == 4){
echo '';
$num = 0;
}
else {
}
if ($seo==yes) {
echo'
<div id="homepage_games">
<a href="' . $siteurl . 'game/' . $games['id'] . '/' . $gameurl . '.html' . '">
<img align="absmiddle" src="' . $games['thumbnail'] . '" width="60" height="60" /> ' . $name . '</a>
</div>';
}
elseif ($seo==no) {
echo'
<div id="homepage_games">
<a href="' . $siteurl . 'index.php?act=game&id=' . $games['id'] . '">
<img align="absmiddle" src="' . $games['thumbnail'] . '" width="50" height="50" /> ' . $name . '</a>
</div>';
}
$num++;
}
?>
</div></div>
CSS involved:
Code CSS:
#left {
position:relative;
float: left;
width: 688px;
color: #784d00;
padding-top: 10px;
padding-left: 8px;
overflow:hidden;
display: inline-block;
}
#homewrapper{
width:100%;
position: relative;
}
#column1{
float:left;
width:32%;
margin-right:5px;
margin-top:5px;
text-align:left;
}
#home_category_heading {
width:100%;
margin:4px;
margin-bottom:4px;
font-family:Tahoma, Arial, Helvetica, sans-serif;
color:#00324c;
background: #d4e2ec url('images/maincat.gif');
background-repeat: no-repeat;
background-position: top left;
padding-top: 5px;
padding-bottom: 9px;
font-size:16px;
font-weight: bold;
text-align:center;
}
By trial and error adding:
to
Code CSS:
#homewrapper{
width:100%;
position: relative;
}
the columns line up. i really don't know why. I have read beaucoup pages today and have been trying everything. Any ideas?
Bookmarks