CSS is not working offline.
Or did I just include the wrong DOCTYPE? Geez, I'm sooo frustrated....
Here it is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
p.line1 { border-top: 2px shaded #0000FF;}
p { font-color: #0000FF;}
</style>
<body>
<p>Test</p>
<p class="line1"></p>
When I open the page, the line doesn't appear. Neither does the color of the text change. Please help me!
You didn't close the <head> tag, nor the html or body tags. Maybe that's the problem.
Also using an external stylesheet is a better practice.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<?php echo "<title>$title</title>"; ?>
<link rel="stylesheet" type="text/css" href="css/style.css">
<?php echo "$includes"; ?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
All the shit I have in the body here
</body>
</html>
Is the genral structure of my page.
Ignore the PHP stuff, that just uses a variable for the title instead of a static one, and $includes is optional Javascript.
It still doesn't work
:(
I'm going to try on Ubuntu
see ya soon
Try just 'color' instead of 'font-color'
Quote from: Frutta Procione on December 23, 2008, 09:07:47 PM
Try just 'color' instead of 'font-color'
That isn't my main problem ATM but okay
Quote from: Terran SCV on December 23, 2008, 09:19:31 PM
That isn't my main problem ATM but okay
what is the problem
Quote from: Frutta Procione on December 23, 2008, 09:30:44 PM
what is the problem
Bottom line: CSS isn't working
at all, even on Ubuntu.
Quote from: Terran SCV on December 23, 2008, 09:32:25 PM
Bottom line: CSS isn't working at all, even on Ubuntu.
Just your CSS or any CSS?
Quote from: Frutta Procione on December 23, 2008, 09:33:44 PM
Just your CSS or any CSS?
What the frak
I tried
body { margin: 2em;}
and it worked baddood;
What's wrong? Should I use border-bottom instead?
EDIT: It works now. Odd.
I blame Microsoft.
Thanks JMV :3
You're using XHTML, so you have to close everything. Even the meta tag.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
p.line1 { border-top: 2px shaded #0000FF;}
p { color: #0000FF;}
</style>
</head>
<body>
<p>Test</p>
<p class="line1"></p>
</body>
</html>
If you were using standard HTML as the doctype, it'd probably work as is.
Oh, and like JMV said, font-color is not a css attribute. Use "color" instead.