Jump to content

External Style Sheet Not Working


kfog6

Recommended Posts

Hi..this is my first ESS..for some reason it will not work..can someone give me some troubleshooting ideas please?..thank you. p.s. the css resides on my hard drive. Here is the home page code: ------------------------------------------- <head> <title>Cat Info-Introduction</title> <style type="text/css"> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <link rel="stylesheet" type="text/css" href="file:///c|\Documents and Settings\Kevin\Desktop\Website\CSS\base.css" /> </style> </head> ------------------------------------------------ here is the css: ---------------------------------------------- h1,h2,h3{color:#412700;font-family:"Verdana",sans-serif;} p{color:#8c5900; font-size:120%;font-family:"Helvetica",sans-serif;} a:link{color:#8C5900;} a:visited{color:#005073;} a:hover{color:#412700;} body{background:#acacac;}

Link to comment
Share on other sites

The problem is that your HTML is sloppy.You have:<head><title>Cat Info-Introduction</title><style type="text/css"><meta http-equiv="content-type" content="text/html;charset=utf-8" /><link rel="stylesheet" type="text/css" href="file:///c|\Documents and Settings\Kevin\Desktop\Website\CSS\base.css" /></style></head> And it SHOULD be like this:<head><title>Cat Info-Introduction</title><meta http-equiv="content-type" content="text/html;charset=utf-8" /><link rel="stylesheet" type="text/css" href="file:///c|\Documents and Settings\Kevin\Desktop\Website\CSS\base.css" /><style type="text/css"></style></head> You ONLY put CSS inside <style> tags, NOT <meta> and <link> tags.You may also put @ rules in <style> tags. Example:@import@screen@printetc.

Link to comment
Share on other sites

Awesome!...thank you Eric..now my sheet works thanks to you...fabulous..amazing how new guys like me make silly errors...appreciate the prompt help!cheers,Kevin

The problem is that your HTML is sloppy.You have:<head><title>Cat Info-Introduction</title><style type="text/css"><meta http-equiv="content-type" content="text/html;charset=utf-8" /><link rel="stylesheet" type="text/css" href="file:///c|\Documents and Settings\Kevin\Desktop\Website\CSS\base.css" /></style></head> And it SHOULD be like this:<head><title>Cat Info-Introduction</title><meta http-equiv="content-type" content="text/html;charset=utf-8" /><link rel="stylesheet" type="text/css" href="file:///c|\Documents and Settings\Kevin\Desktop\Website\CSS\base.css" /><style type="text/css"></style></head> You ONLY put CSS inside <style> tags, NOT <meta> and <link> tags.You may also put @ rules in <style> tags.  Example:@import@screen@printetc.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...