Jump to content

.CSS not showing up in PHP page.


Xdega

Recommended Posts

So. I am up to the final part of my project. The fun part, the formatting with .css

Excited to polish this up, I went ahead and made a style sheet and linked it to the PHP page.

Unfortunately the stylesheet is not working.  :shrug:

 

Here is the index.php

<html>
<head>
<LINK rel=”stylesheet” type=”text/css” href=”ppm.css” mce_href=”ppm.css”>
<TITLE>KENKOS PPM</TITLE>
</head>

<body>
<u><h3>Performance Point Monitor (PPM): Knights of Shadow WoW Officers.</h3></u>
<?php
include('/home/a3269923/public_html/ppm/admin/config.php');
include('/home/a3269923/public_html/ppm/admin/dbopen.php');
$query="SELECT * FROM players ORDER BY ND_POINTS DESC";
$result=mysql_query($query);
$num=mysql_numrows($result);
?>
<table border="1" CELLSPACING=3 style="position:absolute;width:500;height:10;left:0;top:70">
<tr>
<th><font face="Arial, Helvetica, sans-serif">PLAYER</font></th>
<th><font face="Arial, Helvetica, sans-serif">POINTS</font></th>

</tr>
<?php
$i=0;
while ($i < $num) {
$f1=mysql_result($result,$i,"PLAYER_NAME");
$f2=mysql_result($result,$i,"ND_POINTS");
//COLOR THE TABLE
if ($f2 >= 75){
   $color="GREEN";
} elseif ($f2 >= 50){
   $color="YELLOW";
} else {
   $color="RED";
}
?>
<tr>
<td bgcolor="<?php echo $color; ?>"><font face="Arial, Helvetica, sans-serif"><?php echo $f1; ?></font></td>
<td bgcolor="<?php echo $color; ?>"><font face="Arial, Helvetica, sans-serif"><?php echo $f2; ?></font></td>
</tr>
<?php
$i++;
}
?>

<?php
include('/home/a3269923/public_html/ppm/admin/config.php');
include('/home/a3269923/public_html/ppm/admin/dbopen.php');

//USER LOG
$query="SELECT * FROM editlog ORDER BY TIMESTAMP DESC";
$result=mysql_query($query);
$num=mysql_numrows($result);

?>
<table border="1" style="position:absolute;width:600;height:10;left:510;top:70">
<tr>
<th><font face="Arial, Helvetica, sans-serif">USER</font></th>
<th><font face="Arial, Helvetica, sans-serif">TYPE</font></th>
<th><font face="Arial, Helvetica, sans-serif">POINTS</font></th>
<th><font face="Arial, Helvetica, sans-serif">NOTES</font></th>
<th><font face="Arial, Helvetica, sans-serif">DATE</font></th>
</tr>

<?php

$i=0;
while ($i < $num) {
$f1=mysql_result($result,$i,"USER");
$f2=mysql_result($result,$i,"TYPE");
$f3=mysql_result($result,$i,"POINTS");
$f4=mysql_result($result,$i,"NOTE");
$f5=mysql_result($result,$i,"TIMESTAMP");
//COLOR THE TABLE ROWS
if($f2 == ADDED){$color="GREEN";}
if($f2 == SUBTRACTED){$color="RED";}
?>
<tr>
<td bgcolor="<?php echo $color; ?>"><font face="Arial, Helvetica, sans-serif" ><?php echo $f1; ?></font></td>
<td bgcolor="<?php echo $color; ?>"><font face="Arial, Helvetica, sans-serif" ><?php echo $f2; ?></font></td>
<td bgcolor="<?php echo $color; ?>"><font face="Arial, Helvetica, sans-serif" ><?php echo $f3; ?></font></td>
<td bgcolor="<?php echo $color; ?>"><font face="Arial, Helvetica, sans-serif" ><?php echo $f4; ?></font></td>
<td bgcolor="<?php echo $color; ?>"><font face="Arial, Helvetica, sans-serif" ><?php echo $f5; ?></font></td>
</tr>
<?php
$i++;
}
?>]

 

and here is the ppm.css

 TABLE
  {
     font-family:arial;
     font-size:24pt;
     background-color:#000000;
     border-style:solid;
     border-color:#C0C0C0;
     border-width:3px;
  }

  TH
  {
     font-size:15;
     background-color:#000000;
     color:#FFFFFF;
     border-style:solid;
     border-width:2;
     border-color:#C0C0C0;
  }


  TR
  { 
     vertical-align:center;
  }

  TD
  {  
     font-size:10pt;
     background-color:#000000;
     color:white;
     border-style:dashed;
     border-width:1px;
     border-color:white;
     text-align:left;
  }

 

Any ideas?

 

Link to comment
https://forums.phpfreaks.com/topic/218589-css-not-showing-up-in-php-page/
Share on other sites

Start by getting rid of the curly quotes ”” and replace them with regular straight quotes.

 

<LINK rel=”stylesheet” type=”text/css” href=”ppm.css” mce_href=”ppm.css”>

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.