Saturday, 14 September 2013

External Style Sheet does not work with `h1` in XAMPP

External Style Sheet does not work with `h1` in XAMPP

I am trying to make a navigation bar in a separate file, so that I may
include it with php later. The file, nav_menu.php, contains a h1 tag, a p
tag, and an ul containing a tags.I made the CSS in an External Style
Sheet. I styled all the elements. The h1 tag didn't work. Why?
nav_menu.php:
<html>
<head>
<link rel="stylesheet" type="text/css" href="nav_menu.css">
</head>
<body>
<h1 title="School Helping Program">------ S.H.P. ------</h1>
<p title="S.H.P.">School Helping Program</p>
<ul>
<li><a href="home.php">home</a></li>
<li><a href="marks.php">marks</a></li>
<li><a onclick="logout()">log out</a></li>
</ul>
</body>
</html>
nav_menu.css:
<style>
h1{text-align:center;color:#CC0000;}/*Here's the prolbem*/
p{font-style:italic;text-align:center;}
li{float:left;}
ul{list-style-type:none;margin:0;padding:0;}
a{
display:block;
width:180px;
text-align:center;
background-color:#5CB8E6;
text-transform:uppercase;
color:#CC0000;
text-decoration:none;
padding:10px 135px;
cursor: pointer;
}

No comments:

Post a Comment