Jamesking56 Posted February 13, 2008 Share Posted February 13, 2008 I have had to change a few things due to privacy issues.....can you help me change the text color to white in the table? i have tried to add <font> tags and it didn't work, it came up with PHP Errorsplease help! <html><head><?phpinclude("config.php"); [b]*THIS HAS MY DATABASE SETTINGS*[/b]?><title>TITLE BLANKED!</title></head><body bgcolor="#000000"><font color="white"> [b]*This does all of the writing EXCEPT the table*[/b]<center><img src="JUST A LOGO!!"><br>Welcome to the BLANKED OUT<br><br>BLANKED OUT!<br>Files:<br> [b]*HERE IS THE TABLE IN THE PHP TAGS, IT GETS THINGS FROM A DATABASE THEN PUTS THEM IN A TABLE*[/b]<?php$result = mysql_query("SELECT * FROM downloads WHERE file_type='theme'");echo "<table border='1'><tr><th>File Name</th><th>Uploaded By</th></tr>";while($row = mysql_fetch_array($result)){echo "<tr>";echo "<td>" . $row['file_name'] . "</td>";echo "<td>" . $row['uploaded_by'] . "</td>";echo "</tr>";}echo "</table>";echo "<br>";?></font></center></body></html> I apprieciate your help! Link to comment Share on other sites More sharing options...
justsomeguy Posted February 13, 2008 Share Posted February 13, 2008 The easiest way would be to put a CSS class on the table and then set up some rules:echo "<table border='1' class='mainTable'>Then up in the head you can add this:<style type="text/css">.mainTable td { color: #FFFFFF;}</style> Link to comment Share on other sites More sharing options...
Jamesking56 Posted February 13, 2008 Author Share Posted February 13, 2008 The easiest way would be to put a CSS class on the table and then set up some rules:echo "<table border='1' class='mainTable'>Then up in the head you can add this:<style type="text/css">.mainTable td { color: #FFFFFF;}</style>I just tried that and it didn't work, the text stayed black..... Link to comment Share on other sites More sharing options...
justsomeguy Posted February 13, 2008 Share Posted February 13, 2008 Well that doesn't make sense, did you put the CSS code into the <head> of the HTML document? You could add inline CSS to every table cell, but it would be a waste of space.echo "<td style=\"color: #FFFFFF;\">" . $row['file_name'] . "</td>"; Link to comment Share on other sites More sharing options...
Jamesking56 Posted February 15, 2008 Author Share Posted February 15, 2008 Well that doesn't make sense, did you put the CSS code into the <head> of the HTML document? You could add inline CSS to every table cell, but it would be a waste of space.echo "<td style=\"color: #FFFFFF;\">" . $row['file_name'] . "</td>";i will try that now,i did put that CSS in the Head of my document Link to comment Share on other sites More sharing options...
Jamesking56 Posted February 15, 2008 Author Share Posted February 15, 2008 I tried that but it didn't workhere is now how my code looks: <html><head><style type="text/css">.mainTable td {color: #FFFFFF;}</style><?phpinclude("config.php");?><title>BLANKED!</title></head><body bgcolor="#000000"><font color="white"><center><img src="IMAGE BLANKED"><br>Welcome to the BLANKED Downloads Area! BLANKED Database!<br><br>BLANKED!<br>Files:<br><?php$result = mysql_query("SELECT * FROM downloads WHERE file_type='theme'");echo "<table border='1' class='mainTable'><tr><th>File Name</th><th>Uploaded By</th></tr>";while($row = mysql_fetch_array($result)){echo "<tr>";echo "<td style=\"color: #FFFFFF;\"><a href=" . $row['link'] . ">" . $row['file_name'] . "</a></td>";echo "<td style=\"color: #FFFFFF;\">" . $row['uploaded_by'] . "</td>";echo "</tr>";}echo "</table>";echo "<br>";?></font></center></body></html> Link to comment Share on other sites More sharing options...
Jamesking56 Posted February 15, 2008 Author Share Posted February 15, 2008 The text is still black....... Link to comment Share on other sites More sharing options...
justsomeguy Posted February 18, 2008 Share Posted February 18, 2008 Well, I'm not sure what you're including with the config file, but for me this text is white. The link still uses the link color, you can change that using CSS as well. <html><head><style type="text/css">.mainTable td {color: #FFFFFF;}</style><title>BLANKED!</title></head><body bgcolor="#000000"><font color="white"><center><img src="IMAGE BLANKED"><br>Welcome to the BLANKED Downloads Area! BLANKED Database!<br><br>BLANKED!<br>Files:<br><table border='1' class='mainTable'><tr><th>File Name</th><th>Uploaded By</th></tr><tr><td style="color: #FFFFFF;"><a href="">$row['file_name']</a></td><td style="color: #FFFFFF;">$row['uploaded_by']</td></tr></table><br></font></center></body></html> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.