Skip navigation
Currently Being Moderated

default link selectors

Aug 7, 2012 12:46 PM

Tags: #cs5 #links

They are not in my style sheet. Do they show up somewhere else, or if I want to edit them using css (ie: a:link { color: #333333;) do I add the selectors to the body section of my main style sheet. Thank you.

 
Replies
  • Currently Being Moderated
    Aug 7, 2012 12:59 PM   in reply to Quahog68

    You can put them anywhere you want within you stylesheets or your page (embedded in a stylesheet in the head), being mindful of the cascade of those styles.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 7, 2012 2:40 PM   in reply to Quahog68

    To clarify Murray's answer, there is nowhere to edit the link styles, you need to create new styles for the links.

     

    Your main style sheet does not have a body or a head section, as html pages do, You can indicate different style groups on the stylesheet using comments, if you wish. The theory behind cascading style sheets (CSS), is that styles further down on the sheet can cancel out styles defined earlier in the stylesheet. Organizing a stylesheet carefully is always a good idea.

     

    If you want the link styles to change universally throughout your site, put the styles near the top of the stylesheet and do not put any overriding styles further down on the sheet. Always list link styles in this order: a:link, a:visited, a:hover, a:active.

     

    Then be sure to link the stylesheet to all pages in your site!

     

    Beth

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points