Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want to create css 1

Status
Not open for further replies.

nelljack

Technical User
Dec 23, 2001
337
US
I want to clean up some coding in my web page and put it into a css file. How do I take the example below:

a:hover { font-family: Verdana, Verdana, Arial,...

and put all the code lines like it into a css file? These lines are very long and are used over and over.

How do I write the code in my initial file to read the css?
Can I add the border codes too into the css?

Thanks for your help.
 
You can put any css styles you want into the file. Here's how you do it:

Save your css styles into a file. DO NOT include the <style> and </style> tags! You can call it anything you want. I use the extension .css so I know what it is. Upload it to your web site.

Add the following line to your web pages. I put it in the head section, but that may not be required.
Code:
<link rel=&quot;stylesheet&quot; href=&quot;/style/global.css&quot; type=&quot;text/css&quot;>
The href can be absolute or relative. One thing I've found, if it's in the same directory as the web page, you should use &quot;./filename.css&quot;. For some reason some browser (I don't recall which) seemed to have a problem locating it without the ./ part. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Thank you very much for the help. Kudos to you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top