Jump to content

Help with external sheets linking


reportingsjr

Recommended Posts

Im making a website with a few pages and didnt want to do the style over and over again and I tried linking.How do I do it!!the code for my style sheet is:

<head><title></title><style type="text/css"><!--body {        font-size: 12pt; font-family: Times,Times new roman;        background-color: #000000;        color: #FFFFFF;     }table {       cellpadding: 0px;      }--></style></head>

my link is:

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

If I am coding the style sheet wrong how do I code it? yes, they are in the same folder and my style sheet is saved as .css.help appriciated!Edit: thanks Little Goat, I got it now but check last post.

Link to comment
Share on other sites

the correct way to make your css a valid external css file:

body { font-size: 12pt; font-family: Times,Times new roman; background-color: #000000; color: #FFFFFF;    }table {      cellpadding: 0px;     }

in other words, don't put html tags in your css.you only need to put what is inbetween the style tags and inside the comment.LG

Link to comment
Share on other sites

Ohhh, I got you. so you only need the css and nothing else. Thanks! Ill try this once I get home =]. Plus, this will make my website files much smaller. One more thing, How would I make a footed file or a header file and just put in like a link so that way it shows every time. I remember seeing something like this somewhere and I forgot where and how. I want to know this because I have a link bar and I would like to put it in every page without having to do all the coding I have to. Thanks Little Goat!

Link to comment
Share on other sites

you can use xml data islands, <xml> tag works in IE, but I'm not sure what to do in other browsers.(see my signature :) ) search xml data islands on w3schools.com and see what comes up.LG

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