rooksie54,
[edit: devinemike's method is better ]
There are many ways to do it. You can intialize a table with the columns that are equal size to the images, etc.
They use css on phatfactory.net (if you view the source you can get the css file).
THey use:
.random_box {
float: left;
margin: 0;
width: 140px;
height: 140px;
overflow: hidden;
}
.random_box img {
border: 0;
}
Which in short is basically just a small layer. They implement them in span tags, with the class "random_box";
If you copy their method, you would use something like:
<style type="text/css">
<!--
.random_box {
float: left;
margin: 0;
width: 140px;
height: 140px;
overflow: hidden;
background-color: #000000;
}
.random_box img {
border: 0;
}
-->
</style>
<?php
$pics = array(
"block1.jpg",
"block2.jpg",
"block3.jpg",
"block4.jpg",
"NULL",
"NULL",
);
shuffle($pics);
foreach($pics as $pics) {
if ($pics != "NULL") {
echo "<span class=\"random_box\"><a href=\"#\"><img src=\"$pics\" border=\"0\"></a></span>;
} else { // This would be an empty box
echo "<span class=\"random_box\"> </span>";
}
}
?>
Of Course, thats based on a 140x140 image.
It may need some tweaking, but that's the general idea.