January 30, 2025, 12:46:15 PM

1,531,387 Posts in 46,736 Topics by 1,523 Members
› View the most recent posts on the forum.


CSS

Started by Terran SCV, December 23, 2008, 08:47:43 PM

previous topic - next topic

0 Members and 2 Guests are viewing this topic.

Go Down

Terran SCV

CSS is not working offline.

Or did I just include the wrong DOCTYPE? Geez, I'm sooo frustrated....

Here it is
Code Select

<!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!
$~ find /home -user You
     ./base

$~ su You

$~ pidof d00dz
     1337

$~ kill 1337

Daddy

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.
Code Select
<!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.

Terran SCV

It still doesn't work
:(

I'm going to try on Ubuntu
see ya soon
$~ find /home -user You
     ./base

$~ su You

$~ pidof d00dz
     1337

$~ kill 1337

Daddy

Try just 'color' instead of 'font-color'

Terran SCV

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
$~ find /home -user You
     ./base

$~ su You

$~ pidof d00dz
     1337

$~ kill 1337

Daddy

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

Terran SCV

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.
$~ find /home -user You
     ./base

$~ su You

$~ pidof d00dz
     1337

$~ kill 1337

Daddy

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?


Terran SCV

Quote from: Frutta Procione on December 23, 2008, 09:33:44 PM
Just your CSS or any CSS?



What the frak

I tried
Code Select

body { margin: 2em;}


and it worked     baddood;

What's wrong? Should I use border-bottom instead?


EDIT: It works now. Odd.
I blame Microsoft.
$~ find /home -user You
     ./base

$~ su You

$~ pidof d00dz
     1337

$~ kill 1337

Terran SCV

$~ find /home -user You
     ./base

$~ su You

$~ pidof d00dz
     1337

$~ kill 1337

bluaki

You're using XHTML, so you have to close everything. Even the meta tag.
Code Select

<!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.

Go Up