Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

2 different color for links?


Guest

Recommended Posts

Posted

Hi all,

I'm making a new oscommerce shop from a template (with STS) and would like to use 2 link colors on a page. Is it possible and does anybody knows hows?

thanks in advance,

Chris

Posted

Chris,

 

You can set link colors for new links, active links, visited links in the .css file.

 

ed

Posted

thanks for the reply but I already knew that......In details: in the css the code for links is:

A {

color: #000000;

text-decoration: none;

}

 

A:hover {

color: #AABBDD;

text-decoration: underline;

}

 

Do I make a new class with the above (named B?)things? I'm a css noob so sorry when it's obvious for some people?

laterssssss,

Chris

  • 10 months later...
Posted

No, I don't believe that's possible...CSS makes global changes in regards to links, so you can only have one color unless you were willing to edit the links directly and use HTML tags within the link tags.

Posted
Do I make a new class with the above (named B?)things?

 

No you create a new class like this:

 

A.NEW_LINK_COLORNAME_OR_WHATEVER {
 color: #FF0000; 
}

A.NEW_LINK_COLORNAME_OR_WHATEVER:hover {
 color: #0000FF; 
}

the first field identifies the html element if you set it to B perhaps it will be related with the <b> tag not links

 

Then you use it with the class name when you define the link (A tag).

<a href="mysite.com" class="NEW_LINK_COLORNAME_OR_WHATEVER">The link</a>

Posted

You could define a second link class, ie:

 

.link2 a:link

{

color: #F9F9F9

}

 

but you would still have to add 'class=link2' to all of your <a> tags.

 

EDIT: beat me to it enigma :P

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...