Page 1 of 1

How do i edit the price colour

Posted: Fri Nov 20, 2015 5:49 am
by twd247
Hi

Please can you help i trying to edit the price colour and make it bold.

Thank you
Mark

Re: How do i edit the price colour

Posted: Fri Nov 20, 2015 6:55 am
by VictorDrummond
Are you talking about on the product page?

Re: How do i edit the price colour

Posted: Fri Nov 20, 2015 7:26 am
by twd247
VictorDrummond wrote:Are you talking about on the product page?
Hi Victor

Yes sorry the one on the product page.

Thank you
Mark

Re: How do i edit the price colour

Posted: Fri Nov 20, 2015 12:22 pm
by VictorDrummond
twd247 wrote: Yes ... the one on the product page.
There's many ways to do it and it partly depends what template you have and which method suits you best...

For example Oc 2.x default template places the price in <h2><?php echo $price; ?></h2> ...

So preferred method would be to specify in your stylesheet.css , something like:
h2 {
color: blue; [or specify exact color you want as color: #hexcode]
font-weight: bold; .... (OR font-weight: 700 [is bold] through to 900 [is even more bold])
}

....Which would of course affects all <h2> tags in other parts of the site...

You could also place that code directly into your template header file, but that's a pretty rough and ready way to do it.

Another way would be is in your catalog/view/theme/yourtheme/template/product/product.tpl file, about 1/4 of the way through, find reference to price, which in Oc2 default is: <h2><?php echo $price; ?></h2> , and change to:

<h2><span style="color:#blue;font-weight:bold"><?php echo $price; ?></span></h2>

I personally would always choose method 1, and indeed specify bold for <h1> through to <h6> for all... like this:

h1, h2, h3, h4, h5, h6 {
font-weight: 900;
}

Re: How do i edit the price colour

Posted: Sat Nov 21, 2015 2:21 am
by twd247
Thank you your a star.