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? Link to comment https://forums.phpfreaks.com/topic/153879-css-positioning/ 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 ( Link to comment https://forums.phpfreaks.com/topic/153879-css-positioning/#findComment-808732 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!!! Link to comment https://forums.phpfreaks.com/topic/153879-css-positioning/#findComment-808748 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. Link to comment https://forums.phpfreaks.com/topic/153879-css-positioning/#findComment-808814 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. Link to comment https://forums.phpfreaks.com/topic/153879-css-positioning/#findComment-810418 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.