Click to See Complete Forum and Search --> : Creating CSS for all pages in a website


webnewbieugh
09-15-2006, 01:39 PM
hello all....I have a site with many many pages and so it behooves me to create a CSS for the header and left and right navigation sections. I considered iframe but then read the horrors of search engines and framed sites SO I created a page in frontpage with the header and the navigation menus and named it "Style.css". Then I uploaded the Style.css sheet to my web root directory and on a page i put

<head>
<link rel="stylesheet" type="text/css" href="mywebsite/Style.css">
</head>

and uploaded that page but when I view the page in a browser it does not display the .css elements. Am I oversimplifying this? Is there another step that I have not considered?

Thank you very much for any suggestions.

LeeU
09-15-2006, 01:44 PM
Is there a reason you need the "mywebsite" link? If it's in the main directory, just write is as:

<link rel="stylesheet" type="text/css" href="Style.css">
You might want to consider putting it in a separate directory, i.e.

<link rel="stylesheet" type="text/css" href="/style/Style.css">
Also, make sure the capitalization is the same as the file.

If you're still having problems, could you provide a URL to the pages and the stylesheet?

KDLA
09-15-2006, 02:09 PM
You also might check your CSS using a validator: http://jigsaw.w3.org/css-validator/
It could be that there is a problem "early on" in the CSS, preventing the rest from being applied.

KDLA

webnewbieugh
09-15-2006, 02:23 PM
wow that validator is a great little site...thank You! this is the error I received
Line: 8
Parse error - Unrecognized : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <meta name="generator" content="FontPage"> <style type="text/css"> .ws6 {font-size: 8px;}


Do you have any idea what about this creates an error or how to correct it? Thank you

KDLA
09-15-2006, 03:16 PM
Can you send a link to the page you're testing? It would be easier to see it, than blindly guess the problem.

KDLA

webnewbieugh
09-15-2006, 03:44 PM
do you want to see the css page and the page that it should affect? or just the css page?

KDLA
09-15-2006, 03:53 PM
The page you're using it on -- I can access the CSS from there, if needed.

webnewbieugh
09-15-2006, 05:13 PM
is there some way to post it here or provide you my email or something i just don't want to post it publicly on this site

KDLA
09-15-2006, 09:28 PM
That's OK. Why don't you run the validator again, just to make sure that it wasn't a bug of the validator ("Parse error" could be a problem with it, than your stuff - I notice that no line number was given.) Then, if it has the same error mentioned, look at the explanation provided underneath the error statement. Report back to us, and we'll see if we can help you! :)
KDLA

ray326
09-15-2006, 10:14 PM
Run it through the HTML validator first. That looks like possible HTML problems considering it says it's finding a doctype on line 8.

http://validator.w3.org/

webnewbieugh
09-16-2006, 08:37 AM
my God I got it to work! That is brilliant! Thank you very very much!