papillonstudios Posted July 12, 2009 Share Posted July 12, 2009 In the following code the div 'game' is suppose to apply the colro '#333' as the background color, but its not its just display the div;s that are in it with no background color. whats wrong? <?php //Selecting the News From trhe Table news $query = "SELECT * FROM `games` ORDER BY id"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { echo '<div class="game" style="margin-left:5px; margin-right:5px; background-color:#333;">'; echo '<h1><center>', $row['name'], '</center></h1>'; echo '<div class="margin" style="margin-left:5px; margin-right:5px;">'; echo '<div class="thumbnail" style="float:left; width:100px; height:100px;"'; echo ''.image(''.$row['thumbnail'].'', 'Thumbnail').''; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/165658-solved-no-background-color/ Share on other sites More sharing options...
haku Posted July 12, 2009 Share Posted July 12, 2009 Since this is an HTML/CSS question, you should show us the HTML, not the php. Print out your source code and post it here. Quote Link to comment https://forums.phpfreaks.com/topic/165658-solved-no-background-color/#findComment-873920 Share on other sites More sharing options...
papillonstudios Posted July 12, 2009 Author Share Posted July 12, 2009 echo '<div class="game" style="margin-left:5px; margin-right:5px; background-color:#333;">'; echo '<h1><center>', $row['name'], '</center></h1>'; echo '<div class="margin" style="margin-left:5px; margin-right:5px;">'; echo '<div class="thumbnail" style="float:left; width:100px; height:100px;"'; echo ''.image(''.$row['thumbnail'].'', 'Thumbnail').''; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; That code is the html but in php form because it's inside the php syntax tags. So dont look at the php look at the html inside it Quote Link to comment https://forums.phpfreaks.com/topic/165658-solved-no-background-color/#findComment-874094 Share on other sites More sharing options...
haku Posted July 12, 2009 Share Posted July 12, 2009 You apparently aren't that eager to get helped. Quote Link to comment https://forums.phpfreaks.com/topic/165658-solved-no-background-color/#findComment-874097 Share on other sites More sharing options...
papillonstudios Posted July 12, 2009 Author Share Posted July 12, 2009 Fine i'll go somewhere else. Quote Link to comment https://forums.phpfreaks.com/topic/165658-solved-no-background-color/#findComment-874102 Share on other sites More sharing options...
haku Posted July 12, 2009 Share Posted July 12, 2009 Good luck with that. Quote Link to comment https://forums.phpfreaks.com/topic/165658-solved-no-background-color/#findComment-874275 Share on other sites More sharing options...
papillonstudios Posted July 22, 2009 Author Share Posted July 22, 2009 well would you look at that i got it fixed Quote Link to comment https://forums.phpfreaks.com/topic/165658-solved-no-background-color/#findComment-880319 Share on other sites More sharing options...
haku Posted July 22, 2009 Share Posted July 22, 2009 Good job mate! Only took you a week and a half! Quote Link to comment https://forums.phpfreaks.com/topic/165658-solved-no-background-color/#findComment-880324 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.