Hi, could someone tell me why this CSS dosent work, or do i need this to be posted in the PHP section? The path is right…
Code for CSS =
[CODE]body {
font:14px Arial, Helvetica, sans-serif;
}
.details {
display: none;
font-size:12px;
}
.red_title{
font:20pt Arial;
font-weight:normal;
color:#f00;
}
.button {
background-image: url(“admin_area/images/plus.gif”);
width: 9px;
height: 9px;
display:block;
float: left;
margin-right: 5px;
margin-top: 2px;
}
[code=php]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<title>Leaders</title>
<meta http-equiv=”content-type” content=”text/html; charset=iso-8859-1″ />
<link href=”CSS/PHP_Display.css” rel=”stylesheet” type=”text/css” />
<script type=”text/javascript”>
function showDetails(memberID,button){
var element = document.getElementById(memberID);
if(element.style.display != ‘block’){
element.style.display = ‘block’;
button.style.backgroundImage = ‘url(“/images/minus.gif”)’;
}else{
element.style.display = ‘none’;
button.style.backgroundImage = ‘url(“/images/plus.gif”)’;
}
}
</script>
<noscript>
<style type=”text/css”>
.details {
display: block;
}
</style>
</noscript>
</head>
<body>
<div class=”body_bold”>
<?php
$connx = @mysql_connect(“–“, “–“, “–“) or
die(“ERROR: Unable to establish database connection”);
$dbconnx = @mysql_select_db(‘–‘) or
die(“ERROR: Unable to establish database connection”);
?>
<p class=”red_title”>Leader Team</p>
<blockquote>
<?php
// Request the text of all the jokes
$result = @mysql_query(‘SELECT * FROM `Contacts` GROUP BY `ID`’); /* YOU MAY NEED TO EDIT THIS ID SO THAT
IT IS THE SAME AS THE FIELD NAME
IN YOUR DATABASE */
if (!$result) {
exit(‘<p>Error performing query: ‘ . mysql_error() . ‘</p>’);
}
$num = mysql_num_rows($result);
echo “<div id=”alldetails”>”;
for ($i=0; $i<$num; $i++)
{
$row = mysql_fetch_row($result);
echo “n<p><input type=”image” class=”button” id=”button$i” value=” ” onclick=”showDetails(‘person$i’,this);return true;”> $row[2] $row[3] <a href=”mailto:$row[9]”>$row[9]</a></p>n”;
echo “<p id=”person$i” class=”details”>
Position: $row[1]<br>n
Name: $row[2] $row[3]<br>n
Address: $row[4]<br>n
Town: $row[5]<br>n
Postcode: $row[6]<br>n
Home Phone: $row[7]<br>n
Mobile: $row[8]<br>n
Email: $row[9]</p>”;
}
echo “</div>”;
?>
</blockquote>
</div>
</body>
</html>