Jam-ez
28-05-2009, 09:55 PM
Hai dar,
Basically, I have some php:
while ( $conversation_object = mysql_fetch_object( $select_conversation ) )
{
// spacing
echo( "<br />" );
//
// header/subject
echo( "<div class='subject'>" . $conversation_object->subject . " : " . $conversation_object->date . "</div>" );
//
// sidebar/picture/motto
$profile_mysql = mysql_query( "SELECT * FROM `user` WHERE `username` = '$conversation_object->poster'" );
$profile_picture = mysql_fetch_object( $profile_mysql );
echo( "<div class='sidebar'>" . $conversation_object->poster . "<br /><img src='" . $profile_picture->picture . "'></img>
<br /><br />
" . $profile_picture->motto . "</div>" );
//
// main post
echo( "<div class='main'>" . $conversation_object->message . "</div>" );
//
// footer
echo( "<div class='footer'></div>" );
//
// spacing
echo( "<br /><br />" );
//
}
The CSS is:
.subject {
padding: 5px 10px;
background-color: #666;
}
.sidebar {
float: left;
width: 134px;
padding: 10px;
background-color: #999;
}
.main {
float: right;
width: 392px;
padding: 10px;
background-color: #CCC;
}
.footer {
float: clear both;
width: 526px;
padding: 10px;
}
However, the output I get is like this:
http://habtown.net/pedmore/?part=show_messages
Which sucks, because the main content and sidebar don't always reach the bottom.
Any idea how I'd go about making the sidebar & main content area reach the footer at all times? Otherwise it just looks messy and they aren't the same size.
Thanks a bunch!
sidenote#: this is happening on google chrome & firefox for sure, not sure about other browsers.
Basically, I have some php:
while ( $conversation_object = mysql_fetch_object( $select_conversation ) )
{
// spacing
echo( "<br />" );
//
// header/subject
echo( "<div class='subject'>" . $conversation_object->subject . " : " . $conversation_object->date . "</div>" );
//
// sidebar/picture/motto
$profile_mysql = mysql_query( "SELECT * FROM `user` WHERE `username` = '$conversation_object->poster'" );
$profile_picture = mysql_fetch_object( $profile_mysql );
echo( "<div class='sidebar'>" . $conversation_object->poster . "<br /><img src='" . $profile_picture->picture . "'></img>
<br /><br />
" . $profile_picture->motto . "</div>" );
//
// main post
echo( "<div class='main'>" . $conversation_object->message . "</div>" );
//
// footer
echo( "<div class='footer'></div>" );
//
// spacing
echo( "<br /><br />" );
//
}
The CSS is:
.subject {
padding: 5px 10px;
background-color: #666;
}
.sidebar {
float: left;
width: 134px;
padding: 10px;
background-color: #999;
}
.main {
float: right;
width: 392px;
padding: 10px;
background-color: #CCC;
}
.footer {
float: clear both;
width: 526px;
padding: 10px;
}
However, the output I get is like this:
http://habtown.net/pedmore/?part=show_messages
Which sucks, because the main content and sidebar don't always reach the bottom.
Any idea how I'd go about making the sidebar & main content area reach the footer at all times? Otherwise it just looks messy and they aren't the same size.
Thanks a bunch!
sidenote#: this is happening on google chrome & firefox for sure, not sure about other browsers.