Creating External Style Sheets
Always put the code in your header and preview it before you put it in an external file, make sure it working before you go live with it.
1.
Open Notepad cut and paste in your code
from the existing page.
Here's an example
without
the opening or closing STYLE tags! You don't use them in an external sheet so remove those when you paste in your code.
a {display: inline; text-decoration: none; height: 1em; padding: 2px; border: 1px solid;
border-color: #aaa #000 #000 #aaa; background: #11400b; margin: 5px;}
a:hover {display: inline;color: #FFFFFF; height: 1em; padding: 2px;text-decoration:none;
background: maroon; top: 1px; left: 1px; border-color: #000 #aaa #aaa #000;}
2.
Save the file in text-only format. Name it anything you want, but sure to give it a .css extension, by that I mean add .css to the end of the name rather than the default .txt
3.
Put this file in the HEAD of your Web Studio page(s) Change your-stylesheet-name to what you used and check the spelling!
<link rel=stylesheet type="text/css" href="Your-stylesheet-name.css">
If you attached it to the website
or
<link rel=stylesheet type="text/css"
href="$thisfolderurl$Your-stylesheet-name.css">
if you attached it to the page HTML
4.
On your web studio page you open the HTML object and paste in your links or you can use another object like text or an image object. If that is the case then link the css style sheet to that objects ID# like
TXTOBJ7D62050381E35B5
for example.
Web studio uses css coding so use it to your advantage, but if you do add some code for a different font for a menu say, put it in an HTML object. The internal styles overide ones placed in the external sheet.
Creating External JavaScript Files
External JavaScript files are a great way to use the same JavaScript functions on every page, reduce space and they can be updated from the one file.
Always check your code before you it in an external file. Put it your web studio page header and preview the page first, then if it's okay attach it to an external link. When you're ready to create your external files:
1.
Open Notepad and paste in your existing JavaScript code. Don't include opening and closing SCRIPT tags inside the external file.
2.
Save the file in text-only format with a .js extension so in this case you add .js to the end of the name rather than the default .txt
3.
Put the link in the HEAD section of your Web pages. You can include more than one external JavaScript file on the page. Just call each separately like this:
<script src="My-javascript-file-name_1.js"
language="javascript"
type="text/javascript"></script>
<script src="$thisfolderurl$My-javascript-file-name_2.js"
language="javascript"
type="text/javascript"></script>
4.
Attach the file to your page or website as decribed in the no.
4.
above. Place the appropriate files in your HTML object on your page where you want them positioned.