Formatting links with Descendant SelectorsWhen you are designing a web page there are times you will want to have more than one color for links, for example you may want light coloured links that appear against a dark background and dark links that appear against a light background -- on the same page. In the example below we have a content area where the links are clearly visible but in the navigation area with a dark background and the links barely show. While it would be nice to simply be able to select the text of the link and give it another lighter colour it just doesn't work that way.
Descendant Selectors to the rescue. H1 { color: blue } - this would make all H1 tags blue Step 1: Enclose one set of links inside a span tagBlock the links you wish to change the color of and then click on the Quick Tag Editor icon
A fly-out will appear with a choice of tags you can wrap around the current selection, either type in span or choose it from the drop down list.
Alternately you can simply switch to Code view and manually insert the <span> and </span> tags around your list of link tags. Step 2: Create a New CSS Rule
From the Type Category, choose a different colour for the link.
Click Ok. Repeat the process if you would like to specify different colours for the visited, active and hover attributes of these links. span a:visited
© TrainStation - an Adobe Authorized Training Provider
all rights reserved Author - Leslie R. Williams
|
||||||||
Illustrator tutorials | Photoshop tutorials | InDesign Tutorials | Acrobat Tutorials | Dreamweaver Tutorials | Flash Tutorials | Easter Eggs
Home | About | Training | Calendar | Register | Tutorials | Freelance | Contact | F. A. Q | Become an ACE