Hiya all,
I'm currently trying to develop my own website / forum for a gaming guild. This is the first time I've used background images for <div>'s instead of just using a background color. I'm running into an issue, that I'm not quite sure how to solve. Since I am using a background image for my "page"; eventually, if there is too much text, the text just runs over the background image. I'd like to use some coding logic to figure out when my text would start to over run the image, and when that would happen instead create another copy of my background image below the first and start filling data there.
Since I plan on using this as a forum the amount of information is not going to be static. Some people might have a few lines of text, other a wall of text, so I can't really limit it to only 4 posts and than a new page. In theroy here is what I would like to happen....
Say I have 1500 pixels before I start to over run my background image.
1) Create my first div and fill with info.
2) Check height of div, store it in a variable.
3) Create second div.
4) Check height of that div, store it in the same variable.
5) Check to make sure that my variable doesn't exceed 1500px. If it does than I need to create my second page and start filling info there...
I hope I am explaining this to where it is understandable.
Here is a link to the site I am working on: http://98.249.189.188/guildwars/forum/view_topic.php?id=9
Currently, I am pumping out each reply in this fashon:
<?php
while($row_rply = mysql_fetch_array($results_rply))
{
echo "<div class=\"replies\";";
echo "<p>".nl2br($row_rply[0])."</p>";
echo "<p class=\"small\">By: $row_rply[1] on $row_rply[2]</p>";
echo "</div><br />";
}
include('reply.php');
?>