OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: Changing a specific Text Color...
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > General Support
wickedtomkat
I'm having a problem finding the exact locationto change the color of text in my OScommerce pages..

you'd have to see the page to see exactly what I mean..

Page Link

At the top of the page you'll see the text that says "You Have 0 Items in your Cart"

it's a link to the cart of course and the link is purple (I presume cause i've clicked it it may be blue instead of purple to new people) but anyway i want all my links (or maybe just this specific one I don't know) to be white instead of changing colors if you have or havn't clicked them. I've changed the colors on the template page options but it's still not white.. I assume this is in the stylesheets or someplace else in the files. I've alrady looked through the Stylesheet settigns but couldn't find it.. can anyone tell me whereto change this at exactly.
sutikah1
Change the colours of links in catalog/stylesheet.css

I hope this helps.
wickedtomkat
OK.. which option in the Stylesheet do I change cause I've looked over it and I can't find it.
sutikah1
QUOTE (wickedtomkat @ Jan 7 2008, 10:13 PM) *
OK.. which option in the Stylesheet do I change cause I've looked over it and I can't find it.


'A' in the stylesheet denotes a link.
wickedtomkat
OK.. thats one of the one sI thought it was. I changed i to FFFFFF but it's still purple.. it's not changing it at all. so the code for it must be somewhere else sad.gif
sutikah1
QUOTE (wickedtomkat @ Jan 7 2008, 11:07 PM) *
OK.. thats one of the one sI thought it was. I changed i to FFFFFF but it's still purple.. it's not changing it at all. so the code for it must be somewhere else sad.gif


Sometimes you need to open a fresh browser before the effects will take place. Try this first & let the forum know if your problem is solved or if we need to work some more on solving it.
wickedtomkat
I actually totally rebooted and went back to the site.. it's still purple.. I don't get it. You would think it would be the Stylesheet.
sutikah1
QUOTE (wickedtomkat @ Jan 7 2008, 11:43 PM) *
I actually totally rebooted and went back to the site.. it's still purple.. I don't get it. You would think it would be the Stylesheet.


Todd, I just had a thought that it might be a browser issue. Please post your web address and I'll have a look see with different browsers.
chipshot
You have 0 items in your Cart is obviously a contribution You must have installed so there should be added styles in the css
( <span class="headercart">Your Cart Contains <strong>0 items</strong></span> ) is the HTML that it's liked to.

The font is Arial 13px, color: #808080;

That should help you locate it. maybe it's in the head tag?

---install firebug it makes things alot easier to find...
sutikah1
I never noticed the link to your site in the first post. Sorry. I've browsed with a three different browsers & they all show your links to be white. What browser are you using? I think this is your problem. Clear your computers cache and look again.
chipshot
it hovers in purple on firefox
wickedtomkat
I deleted my temp files and reopened the page.. it's white.. til you click it.. a visited link is showing purple.. I tried with Firefox.. same thing. I checked over the stylesheet again.. that color number is not on the list. I checked the addon i'm using and it's not inthe PHP file for it either.. here's the PHp file for the addon

CODE
<?php /* Added: MOD - Cart in Header */ ?>
  <div align="center"><font face="Arial"><a href="shopping_cart.php"> <span class="headercart">Your Cart Contains <strong><?php echo $cart->count_contents()?> items</strong></span></a><span class="headercart"><br>
      Sub Total: <?php echo $currencies->format($cart->show_total())?></font>
<?php /* Added: MOD - Cart in Header */ ?>
wickedtomkat
accidental double post sorry
chipshot
It's gotta be somewhere in that [contribution] I would search through all the files that are related to that contribution..
germ
From the HTML source of that page:

QUOTE
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Underground Music & Hobby Online</title>
</head>

<body text="#000000" bgcolor="#000000" topmargin="0" leftmargin="0" background="Images/Layout-Main/content-bg.jpg" link="#FFFFFF" vlink="#800080" alink="#FFFFFF">


Then later, the link in question:

QUOTE
<span class="headercart">Your Cart Contains <strong>0 items</strong></span>


I see no stylesheet being specified (none in the <head>) so it's using the vlink attribute from the <body> tag, making it purple.

I think...
blush.gif
wickedtomkat
hmmm that's odd.. I fixed that once in the html and uploaded it..and checked it several times... oh well problem solved. Thank's Germ.

my next question is how do I make the text a bit bigger. I would think it would be in the contrib's php where it says what to say.. (see code above) but I tried using font size and nothing changed..
germ
There still isn't any stylesheet specified in the HTML source in that page.

The HTML for the link now reads:

CODE
<div align="center"><font face="Arial"><font size="2" color="#FFFFFF"><a href="shopping_cart.php"> <span class="headercart">Your Cart Contains <strong>0 items</strong></span></a>

It now has a forced size and color ( <font size="2" color="#FFFFFF"> ) that's not in the PHP code you posted above, and that's why it's coming out mostly as you want it.

Have you modified the code you posted to add the font size and color?
unsure.gif

The <head> section reads:

CODE
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Underground Music & Hobby Online</title>
</head>

Still no stylesheet....
blush.gif
wickedtomkat
Do I Have to use stylesheet on that page... I mean if it's working the way I want I don' see the use ofit.. plus I don't know much about using stylesheets altogether...I know how to edit a stylesheet to get the look i want.. but not really how to make one in general.
germ
No, you don't need a stylesheet.

But, the way you talked, I thought you were laboring under the assumption that one was present.

I guess you're good to go now?
unsure.gif
wickedtomkat
Yeah I got that working. But i've ran into another problem now. THe talk about the stylesheetmade me go back and start checking it out. If you login to visit your account.. the links are white.. with a white background.. you can't see any of the links in the My Account section.. if i add the stylesheet tothe template.. it changes the way the whole page looks altogether. SO i am slightly stumped now on how i'm going to get one thing working without messing up another.
germ
In /catalog/account.php

Find this line:

CODE
<!-- start Default Content //-->

Now, go up about 11 lines to this line:

CODE
          <td bgcolor="#ffffff" valign="top">

Change the color there to maybe something like #cccccc
chipshot
Your best best is to create a stylesheet and transfer all the styles to it. that way you separate form from function which is the whole idea behind css to begin with.
creating a stylesheet is alot easier than you might think
create a blank page call it anything you like put a .css extention to it
load it up with all your styles
link your page(s) to like so:

<link rel="stylesheet" type="text/css" href="name_of_stylesheet.css" />

put that just somewhere between <head> and </head>

it should look like this:

<!DOCTYPE>
<head>
<title>Name of your page</title>
<link rel="stylesheet" type="text/css" href="main.css" />
</head>

Now you will know where all your styles sit! makes for much easier editing!
wickedtomkat
Ok let's say I jsut want to edit the stylesheet that come swith OScomemrce to start with.. I know how to change the colors of differant things (though not what each referance is for specifically). When I'm using the stylesheet.. my pages all have a white background. I want the background to be an image.. how and where do I put this in the stylesheet.. like what's the code cause I tried a few differnat things and it did't work.
wickedtomkat
thanks for that link Germ. it helped me alot and I learned a few things. I now have the stylesheet activated on the template page and it looks alot better. However in doing so I now have gone back to square one of making the text white again...

So far I have activated the original stylesheet in the template page...
fixed my background inside that stylesheet so it all matches perfectly..

but what i'm unclear about is how to change the text of that link to white..

if I change the stylesheet color of links to white.. then nothing shows up in the content pages where links should be.. they blend into the white background basically..

here's what I assume..

in the headercart contribution i'm using it has <span class="headercart"> should there be something this referances inside the stylesheet.. cause there is nothing for headercart listed in the stylesheet.

Do I have to add this "headercart" into the stylesheet myself? and if so.. I've tried using what I learned from the link you gave me.. but I guess i'm doing it wrong if thats what I should be doing that is..
i tried adding the following to the stylesheet

CODE
headercart {
  color: #FFFFFF;
  }


the code in the headercart.php file is

CODE
<?php /* Added: MOD - Cart in Header */ ?>
  <div align="center"><font face="Arial"><span class="headercart"><a href="shopping_cart.php">Your Cart Contains <strong><?php echo $cart->count_contents()?> items</strong></span></a><span class="headercart"><br>
      Sub Total: <?php echo $currencies->format($cart->show_total())?></font>
<?php /* Added: MOD - Cart in Header */ ?>


I jsut want what the headercart.php file is supposed ot say in white.. link and all
germ
In your style sheet, change this:

CODE
headercart {
  color: #FFFFFF;
  }

To:

CODE
headercart {
   color: #ffffff;
   }

A.headercart {
   color: #ffffff;
   }

A.headercart:hover {
   color: #ffffff;
   text-decoration: none;
   }

In the code for headercart.php, make this one change

CODE
<?php /* Added: MOD - Cart in Header */ ?>
  <div align="center"><font face="Arial"><span class="headercart"><a class="headercart" href="shopping_cart.php">Your Cart Contains <strong><?php echo $cart->count_contents()?> items</strong></span></a><span class="headercart"><br>
      Sub Total: <?php echo $currencies->format($cart->show_total())?></font>
<?php /* Added: MOD - Cart in Header */ ?>

All I change there was this:

CODE
<a href="shopping_cart.php">

To:

CODE
<a class="headercart" href="shopping_cart.php">
wickedtomkat
Thanks once again Germ. That did the trick.. I wouldn't have figured that out.

It all looks great now and works well.
wickedtomkat
Ok one more quick question.. I'm working on getting the
--- $myaccountlogoff | $cartcontents | $checkout ----
to look right now.. ad I think with what I've learned so far I can fix it.. maybe.. lol.

but where do I find the php code to change these at.. Like I want to change the text color on these to white.. and what i've learned so far I can probaly do it by changing the code to find a stylesheet class.. which should be easy. if i just knew where ot look.
germ
That would be in your /catalog/includes/header.php file

Specifically this line:

CODE
<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.