i’m pulling my images from my DB and trying bring the sort them to list accross rather than up and down. Does anyone know how to achieve this?
My CSS:
#myContent {
-moz-column-count: 3;
-moz-column-gap: 0px;
-webkit-column-count: 3;
-webkit-column-gap: 0px;
column-count: 3;
column-gap: 0px;
width: 900px;
}
#myContent img{
display: inline-block;
margin-bottom: 0px;
width: 90%;
}
My HTML and PHP
<ul id="myContent">
<div id="postedComments">
<?php
$result = mysql_query("SELECT * FROM stories ORDER BY pid ASC limit 0 , 5");
while($data = mysql_fetch_array($result)) {
$pid = $data['pid'];
$photo_url = $data['photo_url'];
echo "<div class='postedComment' id=\"$pid \">
<img src='$photo_url'>
<p>pid: $pid</p>
<hr />
</div>" ;
}
?>
</div>
</ul>
yourThanks guys, for anyone else who may run into this problem, try using http://philipbjorge.github.com/Infinite-Social-Wall/
Philip did a great job at achieving this. If you are an advanced developer you can download his source files and look though his logic. Alternatively you can remove the entire section where the social arrays are being called and just use the database to populate the new items.