Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Quick question about link font colors


st3ady

Recommended Posts

Posted

Hey there,

 

I am trying to make the font color for my hyperlinks to be white in the infoboxes. I changed the A in the stylesheet to #FFFFFF, but this in turn caused all the links in the main page to turn white as well, and this is a problem because the background is white. Any way to make only the hyperlinks in the infoboxes to be white? Any help is greatly appreciated, thanks!

Posted

I am having this problem as well.. Anyone with advice?

Posted

I'd almost pay for the answer to this!!!! Someone help!

Posted

I'd like small unmarked bills :D

 

All links are controled by the same css attribute, therefore if you wish to control just one set of link and make those links different from all the rest, then you will need to create another set in your css and then edit the box that you wish to display different - ie: changing the class it calls.

 

In your css place something like this

 

<style type="text/css">

.custom1 A:link {text-decoration: underline; color: red;}

.custom1 A:visited {text-decoration: none}

.custom1 A:active {text-decoration: none}

.custom1 A:hover {text-decoration: underline; color: green;}

 

And then where ever you wish to use that type of link, edit the appropriate php file and do this

 

<span class="custom1">

<a href="http://www.yourlink.com">Your Link</a>

<br></span>

 

 

If you look around your stylesheet, you'll see different options you can use within the

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

 

Here are some examples of snippits I use (and as you will see, a LOT can be done with css

 

#navcontainer UL

{

list-style: none;

margin: 0;

padding: 0;

border: none;

}

 

#navcontainer LI

{

display: block;

margin: 0;

padding: 0;

float: left;

width: auto;

}

 

 

#subnav

{

position: relative;

top: -1px;

z-index: 101;

margin: 0;

padding: 0px 0 1px 0;

background: #BBBBBB;

border-top: 1px solid #fff;

border-bottom: 1px solid #aaa;

}

 

 

#subnav A:hover, #subnav A:active { color: #444; }

#subnav A.active:link, #subnav A.active:visited { color: #444; }

#subnav BR, #navcontainer BR { clear: both; }

 

 

 

 

.infoBox {

font-family: Verdana, Arial, sans-serif;

font-size: 12px;

color : #5F7143;

border-bottom-width : 1px;

border-top-width : 0px;

border-right-width : 1px;

border-left-width : 1px;

border-bottom-style : dotted;

border-top-style : dotted;

border-right-style : dotted;

border-left-style : dotted;

border-top-color : #8F7156;

border-right-color : #8F7156;

border-bottom-color : #8F7156;

border-left-color : #8F7156;

text-align: center;

}

 

ul {

list-style-image: url(../images/bullet.gif);

}

My Contributions

 

Henry Smith

Posted

Thanks for the reply!!

 

So if my links are being created by the category box, does that mean I would do this..

 

Section of Categories.php-------------------

 

Released under the GNU General Public License

*/

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

for ($i=0; $i<$tree[$counter]['level']; $i++) {

$categories_string .= " ";

}

 

$categories_string .= '<SPAN CLASS="custom1"><a href="';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<b>';

}

 

// display category name

$categories_string .= $tree[$counter]['name'];

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '</b>';

}

 

if (tep_has_category_subcategories($counter)) {

$categories_string .= '->';

}

 

$categories_string .= '</a></SPAN>';

 

 

 

Or am I way off? Thanks!

Posted

Well I tried that and it sorta works.. I have control over the colors but its strange, some links get underlined and some dont, its like the two CSS definitions are fighting it out. :blush:

Posted

OK, I have determined that it reads and enacts everything except for A.link for that it defaults to the originaly CSS "A"

 

Any ideas?

Archived

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

×
×
  • Create New...