...

View Full Version : Why doesn't my CSS external sheet work?



yazan
07-26-2011, 08:37 AM
Hello,

Why won't my CSS sheet work?

My code "search.php":


<html>
<title>Wiki</title>
<head>

<link rel="stylesheet" type="text/css" href="stylesheet.css" />

</head>

<body>

<?php

if( ! isset($_POST['submit']))
{
?>

<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
Keyword: &nbsp;&nbsp; <input type="text" name="keyword"> &nbsp;&nbsp;&nbsp;&nbsp;
By &nbsp;&nbsp;
<select name="column">

<option>question</option>
<option>cause</option>
<option>condition</option>
<option>procedure</option>
<option>plm</option>

</select>

<input type="submit" name="submit" value="Search">
</form>
</center>

<?php

}

else
{

$con = mysql_connect('localhost','root');
$db = mysql_select_db('csr');

$sQry = 'SELECT * FROM csr';
$sWhere = '';
if (isset($_POST['column']))

{
switch ($_POST['column'])
{
case 'question':
$sWhere .= ' WHERE `question` LIKE';
break;
case 'cause':
$sWhere .= ' WHERE `cause` LIKE';
break;
case 'condition':
$sWhere .= ' WHERE `condition` LIKE';
break;
case 'procedure':
$sWhere .= ' WHERE `procedure` LIKE';
break;
case 'plm':
$sWhere .= ' WHERE `plm` LIKE';
break;
}

if (!empty($sWhere) && isset($_POST['keyword']))
{
if (get_magic_quotes_gpc())
{
$_POST['keyword'] = stripslashes($_POST['keyword']);
}
$sWhere .= '\'%' . mysql_real_escape_string($_POST['keyword']) . '%\'';
}
$sQry .= $sWhere;
}


$query = mysql_query($sQry);

if( ! $query ) {
echo "Error doing query...";
}
if(mysql_num_rows($query) > 0) {

echo "Keyword found!<br>";
echo "Amount of keywords: " . mysql_num_rows($query);
echo "<br><br><br>";
while ($csr = mysql_fetch_object($query)){
echo "<textarea>";
echo $csr->plm;
echo "</textarea>";
echo $csr->id . " ";
}
}
else { echo "Keyword not found!" . mysql_error(); }
}

?>

</body>

</html>

My stylesheet "stylesheet.css":


body
{
background-color:#FFFFFF;
}

h1 {text-align:center;color:#19199B;font-family:Arial;font-size:50px;}

hr {color:#19199B;}

p.content {margin-left:200px;margin-right:200px;color:#19199B;font-family:Arial;font-size:14px;}

script.time {margin-right:20px;}

#navbar ul {
margin: 0;
padding: 10px;
list-style-type: none;
text-align: center;
background-color: #19199B;
}

#navbar ul li {
display: inline;
}

#navbar ul li a {
text-decoration: none;
padding: .2em 1em;
color: #fff;
background-color: #19199B;
}

#navbar ul li a:hover {
color: #000;
background-color: #fff;
}





body {

}
ul.sidemenu {
padding: 1;
margin: 0;
list-style: none;
font-family: Arial;
font-size: 0.8em;
border-bottom: 1px solid #000000;
width: 187px;
background-color: #19199B;
}
ul.sidemenu li {
border-top: 1px solid #FFFFFF;
border-left: 1px solid #000000;
border-right: 1px solid #000000;
}
ul.sidemenu li a {
text-decoration: none;
display: block;
width: 165px;
color: #FFFFFF;
font-weight: bold;
padding: 2px 10px;
}
ul.sidemenu li a:hover {
background-color: #FFFFFF;
color: #19199B;
}

Thanks in advance!

yazan
07-26-2011, 08:54 AM
Nevermind I solved it!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum