...

View Full Version : changing text color help plz



relyt
02-01-2003, 11:28 PM
how do i change the text color in the following section of my script:


echo "<h2>Vote Results:</h2>";
echo "<TABLE CELLSPACING=2 CELLPADDING=0 BORDER=0>";
echo "<tr><th>Vote</th><th>Percentage</th><th>Total</th></tr>";

while (list($key, $val) = each( $ANSWER)) {
$percent = $file_array[$key] * 100 / $total;
$percent_int = floor($percent);
$percent_float = number_format($percent, 1);
$tp += $percent_float;
echo "<tr><td> $ANSWER[$key] </td><td><img height=9 src=\"$IMG_DIR_URL/vote_left.gif\"><img height=9 width=\"$percent_int\" src=\"$IMG_DIR_URL/vote_middle.gif\"><img height=9 src=\"$IMG_DIR_URL/vote_right.gif\"> $percent_float % </td><td>$file_array[$key]</td></tr>";
}

echo "</TABLE><br>";

the script can been seen at www.warpcell.com/php_poll.php i want the text to be white and in font "Comic sans MS" how would i do that?

ReadMe.txt
02-02-2003, 12:50 PM
try using CSS styles, you can use them to format all of the headers and all of the table cells' fonts and colours which should be exactly what you need:


<style>
th, td, h2 {
font: "Comic Sans MS";
color: white
}
</style>

Y-STU-K
02-02-2003, 07:31 PM
Yeah learning CSS would be a better way of doing this. I'd personally always use an external style sheet, thus separating your code out better

Jesh
02-03-2003, 05:58 AM
Hey

I don't see what this has to do with PHP?

Jesh

Y-STU-K
02-03-2003, 09:33 AM
IT doesn't but using a CSS style will make changing colours much easier

relyt
02-03-2003, 08:51 PM
Originally posted by Jesh
Hey

I don't see what this has to do with PHP?

Jesh

how do you think it has nothing about php? i had a question about changing something in a php script. where would you like me to post it, in the html forum?

firepages
02-03-2003, 10:33 PM
"how do you think it has nothing about php? i had a question about changing something in a php script. where would you like me to post it, in the html forum?"

well basically yes :)

it is a css/html question and would have been better suited in another forum but since asked and answered I will leave it here.

relyt
02-04-2003, 12:40 AM
obviously i didnt know the solution wasnt php that is WHY I POSTED IT IN THE PHP FORUM



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum