Wrox Home  
Search P2P Archive for: Go

  Return to Index  

html_code_clinic thread: Re: I am trying to change the link color on my pages


Message #1 by Imar Spaanjaars <Imar@S...> on Sat, 01 Feb 2003 09:25:26 +0100
Hi Robin,

If you want all your links in your site to have the same behavior, you 
should move the CSS info to a separate file, something like mainStyles.css

Inside that file you just need the CSS definitions, so not the <style> tag.

Example:

A:visited {
         color : #FF9F00;
         text-decoration: none;
}

A:link {
         color : green;
         text-decoration: none;
}

A:hover {
         color : blue;
         text-decoration: underline;
}

A:active {
         color : red;
         text-decoration: underline;
}


To make this code available in your pages, you need to add the following 
code to _each_ page in your site that needs it:

<link href="styles/mainStyles1.css" rel="stylesheet" type="text/css">

Make sure you adjust the path to the style sheet for pages that are located 
in different subfolders.

If you are using Dreamweaver, the best place to add this stuff is inside a 
template. Set up a general page the way you want it to look, and then build 
new pages based on this template.

Beginning Dreamweaver MX (http://www.wrox.com/books/1861008201.htm) 
discusses all these techniques.

Cheers,

Imar



>  Where should I insert this?
>
>I made some changes to http://www.erols.com/pritamarora/experience.htm
>Please see source code for further details.
>
>Do you have any opinions on how to improve experience or any other pages?
>
>I would like your feedback.



  Return to Index