View Full Version : External Style Sheets


mS_cLaiRe
08-15-2003, 05:11 AM
i'm making a site, and i don't know why, but if I put too much HTML on a page, i can't edit it anymore and it won't save anything. i think most of the space is caused by my css codes, so i wanted to try an external style sheet..but i can't understand the directions on this site =\



How do I link to an external style sheet? Add the following code in the <head> tag of your html document. You have to add this tag to every page you want to put the style sheet on:

<LINK href="mystylesheet.css" rel="stylesheet" type="text/css">

Add your style sheet to a plain text editor like Notepad or Simpletext. Make sure you name it with the .css extension. If you're having trouble saving it as .css, put it in quotes when you try to save it, for example: "mystylesheet.css." Here is a sample, remember not to add the style tags to your text file:

A:link
{ text-decoration: none; }

body
{ background-color: #000000; }


Upload the style sheet to your server and all of your pages will show the new style attributes. This is convienient because when you want to change the style of your whole site, you only have to edit and upload one small file to accomplish this.







do you just save it on notepad? and if you do, i don't understand how to save it as .css PLEASE help

pb&j
08-15-2003, 07:05 AM
start a new document in notepad.
enter your css coding (no style tags around them)
choose...
File, Save As,
"yourfilename.css"

you may have to make the dropdown settings to "all files". be sure to use quotes around your filename.css when you are saving it so the css extension stays there.

Hal
05-15-2006, 01:09 AM
I can't get notepad. What do I do?

amyaurora
05-15-2006, 01:44 AM
Can you open up your file manager and type in a new file? You can use that instead.

Advantage is you wouldn't need to upload anything on to you file manager afer you save.

Dan Williamson
05-15-2006, 02:25 AM
If you can't get Notepad them find it in your System 32 files:

My Computer --> Windows --> System32 (I think)

Anyway then do the above.

pb&j
05-15-2006, 05:13 AM
I can't get notepad. What do I do?
1. you shouldnt need to bring up a thread almost 3 years old. just start your own.

2. any text editor will do. notepad is standard on any windows platform. if you are on mac, then i think its called simpletext or textedit or something like that. or you can download a text editor like htmlkit from chami.

Hal
05-15-2006, 09:32 PM
thanx