Ok, tu problema esta en que tienes que estudiar un poco de css para darle el formato a cierto texto y aplicarlo mediate la etiqueta class.
Te dare un ejemplo para lo de la celda
<?php require_once('../Connections/tuimpresion_connection.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_tuimpresion_connection, $tuimpresion_connection);
$query_TiposUsuarios = "SELECT * FROM users_types";
$TiposUsuarios = mysql_query($query_TiposUsuarios, $tuimpresion_connection) or die(mysql_error());
$row_TiposUsuarios = mysql_fetch_assoc($TiposUsuarios);
$totalRows_TiposUsuarios = mysql_num_rows($TiposUsuarios);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<table width="100%" border="1">
<tr>
<td id="usuario"><?php
if(isset($row_TiposUsuarios['id_users_types']) && ($row_TiposUsuarios['id_users_types'] != "")){
echo $row_TiposUsuarios['id_users_types'];
}
?></td>
</tr>
</table>
</body>
</html>
<?php
if(isset($row_TiposUsuarios['id_users_types']) && ($row_TiposUsuarios['id_users_types'] != "")){
echo "
<script>document.getElementById('usuario').bgColor='#ff0000'</script>
";
}
?>
<?php
mysql_free_result($TiposUsuarios);
?>