saving css

liunx

Guest
I want to write one style sheet for my web pages. How do I begin and end the style sheet and what do I save it as?you can use a simple program like notepad, and when u click file save as, change the file type to all files and just save it with a .css extension, in your css file u dont include anything at the top or bottom just the css style codes, no need for <style type="text/css"> or </style> that is for inline style sheetsthen in your html you would link to the stylesheet by writting <link rel="stylesheet" type="text/css" href=http://www.webdeveloper.com/forum/archive/index.php/"yourfile.css">FYI, it really doesn't matter what extension you give it as long as the HTML page calls it by the same name. However, using a .css extension is a good way to keep it clear what the file is for. :)really? u can call it anything u want?Originally posted by LiLcRaZyFuZzY
really? u can call it anything u want?
Yep. You can even call it "anything_u_want.xyz". :)well...".css" is more conventional...ima stay at thatI would imagine, though, that the file that you call would have to have a text/css MIME type, no? Otherwise, one will encounter some browser issues, I believe.Originally posted by NogDog
FYI, it really doesn't matter what extension you give it as long as the HTML page calls it by the same name. However, using a .css extension is a good way to keep it clear what the file is for. :) Using a .css extension is the best chance you have of convencing a web server to serve the page up with the proper content type. If a browser gets something that isn't text/css then it probably shouldn't treat it as a style sheet.I'ma name mine Bessy.

That's right! Bessy Dot Seaessess.
 
Back
Top