user2044626
user2044626

Reputation: 281

Magento How to custom "price" font size for product page only

I'm trying to change font size and color for "Price" on product page only. When I change .price on style.css it would change price format on all pages which is not what I need. I need to change price format on product page only. Any help, Thanks

Upvotes: 0

Views: 1071

Answers (2)

Jon P
Jon P

Reputation: 19797

You can keep your CSS consolidated and still do this. Add an ID to the body tag of the products page:

<body id="pgProducts">

Or Wrap the contents

<div id="pgProducts">

then you can use that in your "over-ride" selector

#pgProducts .Price {
    /*Style to appear in pgProducts only*/
}

This could give you greater extensibility should this style end up required elsewhere.

Of course you can use what ever ID you like here. You could also use a class instead of an ID but an ID has better specificity.

Upvotes: 0

user4691775
user4691775

Reputation:

You can simply make the change at the top of that particular page or even on that line. Simply place open and close style tags above the body tag and between them insert the rule delaration. This will override the linked style sheet.

Upvotes: 1

Related Questions