jack_o_lantern
03-06-2006, 08:43 PM
Hi,
I'll try to keep this short. I'm redesigning a page I'd previously done with antiquated techniques (eg, tables) using CSS. I've read 'Cascading Style Sheets' 3ed. by Lie and Bos. Now I'm trying to create a very simple test page to apply my style sheet to.
I'm testing only in FireFox at this point (I'm trying to take the advice that if you get it right in FireFox, IE will come easier).
I've validated the html using the W3C tool, and also validated the CSS.
Now, I know there is a lot of old junk (from the original site's style sheet) at the bottom of my CSS, but I thought I'd successfully commented it out. The validator says that the new rules I've set are valid.
My background color and font property don't seem to be working in FireFox. Is this an inheritance problem? I know there has to be something I'm overlooking.
If someone could help clear this up, I'd really appreciate it. I feel like if I can just understand what I'm doing wrong and get FireFox to recognize my properties, it would be a major roadblock out of the way.
I'm trying to learn how to do it the 'right' way, honest!
Thanks,
Michael
Here's the code:
<!DOCTYPE html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK REL="stylesheet" TYPE="text/css" HREF="djstyles"
</head>
<body>
<p>Some text</p>
</body>
</html>
Here's the style sheet:
/*
Body - provides underlying color (light yellow),default font color (black), font style and some margins
*/
body {
background-color: #FEF4DE;
color: #000000;
font: 11pt "Gill Sans MT", Arial, sans-serif;
margin-left: 5%;
margin-right: 5%
}
/*
Links - hyperlink color values
*/
a:link a:hover{
color: #990033 }
a:visited {
color: #336600 }
/*
Area 2 - Sidebar
*/
UL.sidebarlinks {
width: 25%;
float: left;
font: 1em "Arial Narrow", sans-serif;
text-transform: uppercase;
line-height: 1.2em;
list-style: none;
margin-top: 0.5em;
margin-bottom: 0.5em
}
/*
Below this line is all the old 'junk' from the first version of the site
h1 { font-family: Gill Sans MT, Arial; font-size: 14pt; text-align: left; line-height:
100%; margin-left: 36px; margin-top: 0; margin-bottom: 9px }
h2 { margin:5 0; font-size: 24pt; font-family: FuturaTCEExtBol, Arial; color: #333333; letter-spacing:
1pt; text-align:left; line-height:100% }body { font-family: Gill Sans MT; font-size: 11pt; text-align: left; word-spacing: 0;
width: 0; height: 0; margin: 0; padding: 0 }
li { font-size: 11pt; font-family: Gill Sans MT, Arial; margin-left: 18; margin-top:0; margin-bottom:0; line-height:100% }ul { font-size: 11pt; margin-top: 0; margin-bottom: 0; line-height:100% }
table { font-size: 11pt; font-family: Gill Sans MT, Arial; line-height:100%; margin-bottom:0 }h3 { font-family: Gill Sans MT, Arial; font-size: 12pt; text-transform: uppercase;
font-weight: bold; text-align: center; margin-top: 12; margin-bottom:12 }a:active { font-family: Gill Sans MT; line-height: 100%; font-size:11pt }*/
I'll try to keep this short. I'm redesigning a page I'd previously done with antiquated techniques (eg, tables) using CSS. I've read 'Cascading Style Sheets' 3ed. by Lie and Bos. Now I'm trying to create a very simple test page to apply my style sheet to.
I'm testing only in FireFox at this point (I'm trying to take the advice that if you get it right in FireFox, IE will come easier).
I've validated the html using the W3C tool, and also validated the CSS.
Now, I know there is a lot of old junk (from the original site's style sheet) at the bottom of my CSS, but I thought I'd successfully commented it out. The validator says that the new rules I've set are valid.
My background color and font property don't seem to be working in FireFox. Is this an inheritance problem? I know there has to be something I'm overlooking.
If someone could help clear this up, I'd really appreciate it. I feel like if I can just understand what I'm doing wrong and get FireFox to recognize my properties, it would be a major roadblock out of the way.
I'm trying to learn how to do it the 'right' way, honest!
Thanks,
Michael
Here's the code:
<!DOCTYPE html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK REL="stylesheet" TYPE="text/css" HREF="djstyles"
</head>
<body>
<p>Some text</p>
</body>
</html>
Here's the style sheet:
/*
Body - provides underlying color (light yellow),default font color (black), font style and some margins
*/
body {
background-color: #FEF4DE;
color: #000000;
font: 11pt "Gill Sans MT", Arial, sans-serif;
margin-left: 5%;
margin-right: 5%
}
/*
Links - hyperlink color values
*/
a:link a:hover{
color: #990033 }
a:visited {
color: #336600 }
/*
Area 2 - Sidebar
*/
UL.sidebarlinks {
width: 25%;
float: left;
font: 1em "Arial Narrow", sans-serif;
text-transform: uppercase;
line-height: 1.2em;
list-style: none;
margin-top: 0.5em;
margin-bottom: 0.5em
}
/*
Below this line is all the old 'junk' from the first version of the site
h1 { font-family: Gill Sans MT, Arial; font-size: 14pt; text-align: left; line-height:
100%; margin-left: 36px; margin-top: 0; margin-bottom: 9px }
h2 { margin:5 0; font-size: 24pt; font-family: FuturaTCEExtBol, Arial; color: #333333; letter-spacing:
1pt; text-align:left; line-height:100% }body { font-family: Gill Sans MT; font-size: 11pt; text-align: left; word-spacing: 0;
width: 0; height: 0; margin: 0; padding: 0 }
li { font-size: 11pt; font-family: Gill Sans MT, Arial; margin-left: 18; margin-top:0; margin-bottom:0; line-height:100% }ul { font-size: 11pt; margin-top: 0; margin-bottom: 0; line-height:100% }
table { font-size: 11pt; font-family: Gill Sans MT, Arial; line-height:100%; margin-bottom:0 }h3 { font-family: Gill Sans MT, Arial; font-size: 12pt; text-transform: uppercase;
font-weight: bold; text-align: center; margin-top: 12; margin-bottom:12 }a:active { font-family: Gill Sans MT; line-height: 100%; font-size:11pt }*/