20 November 2008

The previous solution explained how to style the different selectors of the anchor element, but what if you want to use different link styles within the same document? Perhaps you want to display links without underlines in your navigation menu, yet make sure that links within the body content are easily identifiable. Or maybe part of your document has a dark background color, so you need to use a light-colored link style there.

SolutionTo demonstrate how to create multiple styles for links displayed on one page, let's take an example in which we've already styled the regular links:

These should be taken as the default link styles , they reflect the way links will normally be styled within your documents. The first rule makes the link blue, so if an area of our page has a blue background, the links that appear in that space will be unreadable. We need to create a second set of styles for links in that area.

First, let's create a class or an id for the element that will contain the differently colored links. If the container is already styled with CSS, it may already have a class or id that we can use. Suppose that our document contains the following markup:

Post a Comment

One of the steps real blog is to monetize the program paid to review. When we already have a blog that we manage, whether paid or not. Very be pitied when we have the potential was not used to gain additional revenue...

Paid-To-Click is an online business model that draws huge amounts of online traffic from people aiming to earn from home. Paid-To-Click, or simply PTC websites act as middlemen between advertisers and consumers; the advertiser pays for displaying ads on the PTC website, and a part of this payment goes to the consumer when he views the advertisement....