PDA

View Full Version : CSS sheet not linking properly


homedeeth
09-24-2008, 07:58 PM
<link href="css/style1.css" rel="stylesheet" type="text/css" />

is the link to my sheet within the index page code

body {
background-color: #bee504;
}
font {
color: #006600;
}

are the only 2 rules. i want the background colour to be the same and any text i write to be the same colour.

i can't tell if it's linking properly cos IE7 works with the colour but not Firefox 3. And any text i write doesn't appear in the colour i want

the file is saved in the same folder as my webpages (DW8)

Ricky55
09-24-2008, 08:26 PM
apply the color property to your body use the following, you don't need to specify background color just use background

body {
background: #bee504;
color: #006600;
}

homedeeth
09-24-2008, 08:28 PM
add that in the style sheet itself? i've got other pages i want to look the same but they're not linking to the stylesheet!!

Ricky55
09-24-2008, 09:48 PM
Create a new CSS style sheet called main.css and save in a folder called styles in the root of your site.

Use this in that file
@charset "UTF-8";
/* CSS Document */

body {
background: #bee504;
color: #006600;
}

Then in the HTML pages you want to link to add this line before the close of the head tag </head>

<link href="css/main.css" rel="stylesheet" type="text/css" />

Ricky55
09-24-2008, 09:50 PM
sorry if your folder is called styles that line would be

<link href="styles/main.css" rel="stylesheet" type="text/css" />