spikypunker Posted April 13, 2009 Share Posted April 13, 2009 Hey guys, am trying to get a CSS div to dynamically insert each time a record is read from Mysql. Currently i've just got this CSS: #track { width: 90px; float: left; display: inline; margin-left:10px; } And this PHP code: $i = 0; while ($i < $num && $i < '10') { $title = mysql_result($result2,$i,"title"); $image2 = mysql_result($result2,$i,"image"); echo "<div id='track'><a href='netdog-track.php?user=$user&title=$title'><img src='netdog/musicpics/$image2' height='90' width='90' border='1'></a> <br><br>$title<br><br></div>"; $i++; } This ALMOST works but for some reason two of the blocks are messing up! You can see here: http://www.maddogmagazine.co.uk/netdog-genres.php?user=spikypunker So close! Any ideas? Quote Link to comment Share on other sites More sharing options...
spikypunker Posted April 13, 2009 Author Share Posted April 13, 2009 Just checked it in IE and it's not working at all! I dont like IE ( Quote Link to comment Share on other sites More sharing options...
spikypunker Posted April 13, 2009 Author Share Posted April 13, 2009 GET IN!!! I simply added in a Height to the Div and it ONLY GOD DAMN WORKS!!! Quote Link to comment Share on other sites More sharing options...
jcombs_31 Posted April 13, 2009 Share Posted April 13, 2009 Without going into your PHP code, you need to change that div id to a class. You are only allowed to have 1 unique ID on the page. Quote Link to comment Share on other sites More sharing options...
noober Posted April 15, 2009 Share Posted April 15, 2009 I would suggest adding a "postion" to your "track" id. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.