Jump to content

[SOLVED] no background color


papillonstudios

Recommended Posts

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>';
}
?>

Link to comment
https://forums.phpfreaks.com/topic/165658-solved-no-background-color/
Share on other sites

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

 

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.