External Style Sheet Doesn't Work
Page 1 of 1
External Style Sheet Doesn't Work
I was experimenting with External style sheets, but I just couldn't get it to work. No matter what I did, I just couldn't use the style sheet properly. Whenever, I opened my site, it wouldn't show anything from the style sheet.Here's my code for the site,
<!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" lang="en">
<head>
<title> Extra Links </title>
<link rel="stylesheet" type="text/css" href="math.css" />
</head>
<body>
<h1> p </h1>
</body>
</html>
Here's the style sheet
h1 {font-color:blue;}
Hope you guys can help with this. Thanks!
Re: External Style Sheet Doesn't Work
Well, is the stylesheet and HTML file in the same folder?--
~Chris
~Chris
Re: External Style Sheet Doesn't Work
the stylesheet and file are in the same folder , and to cubesquare's reply, i meant to write that any type of css in my stylesheets would fail namely font-size. Your example with color worked, but when i tried it with font-size, nothing happened. Thank youRe: External Style Sheet Doesn't Work
The problem is that the css works when it is embedded, but the ESS will not work.<!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" lang="en">
<head>
<title> Extra Links </title>
<style>
h1 {font-size: 60px; font-family: times new roman;}
h2 {font-size: 30px; font-family: times new roman;}
p {font-size: 15px; font-family: times new roman;}
</style>
</head>
<body>
<h1 style="position:absolute;top 0 px;left:450px;"><Font Color="blue"> Extra links <Font></h1>
</body>
</html>
This way works, but when i do this:
h1 {font-size: 100px; font-family: arial;}
and
<!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" lang="en">
<head>
<title> Extra Links </title>
<style>
<link rel="stylesheet" type="text/css" href="math.css">
</style>
</head>
<body>
<h1 style="position:absolute;top 0 px;left:450px;"><Font Color="blue"> Extra links <Font></h1>
</body>
</html>
It fails,
can you tell me where the error in syntax is, so i can fix it?
Thank you.
Re: External Style Sheet Doesn't Work
Thanks CubeSquare for your help, i really appreciate it, but another problem came up, your stylesheet worked, but when i tried doing it with font-size, it failed, everything else worked. Do you know why font-size doesn't work.Thanks
Mastermind
Re: External Style Sheet Doesn't Work
Thanks CubeSquare!!!! It Finally worked!!!!!!!!!!!!!!!Mastermind
Page 1 of 1