reportingsjr Posted April 3, 2006 Share Posted April 3, 2006 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 More sharing options...
snowboard01 Posted April 3, 2006 Share Posted April 3, 2006 I have already written this in the original post u cant have a style tag in the style sheet. the style tag is a html tag and it makes css defective when it is in a .css doc Link to comment Share on other sites More sharing options...
Little Goat Posted April 3, 2006 Share Posted April 3, 2006 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 More sharing options...
reportingsjr Posted April 3, 2006 Author Share Posted April 3, 2006 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 More sharing options...
Little Goat Posted April 4, 2006 Share Posted April 4, 2006 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 More sharing options...
reportingsjr Posted April 4, 2006 Author Share Posted April 4, 2006 Im not an xml fan.. sorry Link to comment Share on other sites More sharing options...
Little Goat Posted April 4, 2006 Share Posted April 4, 2006 I'm pretty sure there's some server side language solution, try posting in the php or asp forums and see what comes up.LG Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now