VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: andrew222 on September 15, 2016, 01:54:30 AM

Title: Center align price on manufacturer products page
Post by: andrew222 on September 15, 2016, 01:54:30 AM
Hi,

I'm struggling to align the price to a center position on the manufacturer products page. I found the page to edit which is

com_virtuemart/sublayouts/products.php but I've tried all sorts with no success. The price always aligns to the left and I can't over ride it.

Here's the page in question

******

As you can see the the product title, short description and the Purchase button are all center aligned to the price looks a little silly over on the left.

Appreciate any help.

Many thanks,

Andrew

Title: Re: Center align price on manufacturer products page
Post by: jenkinhill on September 15, 2016, 10:16:08 AM
Just use a css override, probably something like:
.product  .product-price {
    float: none;
    text-align: center;
}

http://forum.virtuemart.net/index.php?topic=116620.0

Add the style at the end of your template css to prevent it from being over-written when you next update VM.
Title: Re: Center align price on manufacturer products page
Post by: andrew222 on September 15, 2016, 10:41:05 AM
Wonderful. Thanks very much Kelvyn.

I do normally use firebug but didn't seem to be getting anywhere with this one.

Added your code and also found this code that was changing the size and colour of the price so just changed those two to what I needed.

.featured-view .spacer span, .latest-view .spacer span, .topten-view .spacer span, .recent-view .spacer span, .related-products-view .spacer span, .browse-view .row .product .spacer span {
    color: #000000;
    font-size: 15px;
}


Cheers

:)