News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How do I add an additional class to the Add to Cart button on the products page?

Started by jus2sho, August 08, 2014, 19:31:07 PM

Previous topic - Next topic

jus2sho

First off, I'm a beginner when it comes to CSS, so please dummy down your reply.  Currently, the CSS for the Add to Cart button on the products page is linked to the Add to Cart button on the product details page.  How would I go about creating a separate class that only affects the Add to Cart button on the products page?  Specifically, I would like to change the position of the Add to Cart button on the products page without affecting it on the details page.  Which files will I need to modify to make this work?  Below are pages for reference.

1. http://bit.ly/1s34qpF

2. http://bit.ly/UVsc8m
Joomla 2.5.9
VM 2.0.26d

GJC Web Design

css rules can be wriiten in any file that is loaded

so pick one and

products page :

.browse-view .addtocart-button {
do what you want
}

products detail page:

.productdetails-view .addtocart-button {
do what you want
}
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jus2sho

Yes, but which file do I add the additional class to?  I want to add the additional rule to the Add to Cart button on the Products Page, but have it omitted on the Details Page. 
Joomla 2.5.9
VM 2.0.26d

GJC Web Design

which is EXACTLY what the above will do.. you don't need any additional class - the ones above are already there!


think you had better read this ->

Descendant Selector

The descendant selector matches all element that are descendants of a specified element.

The following example selects all <p> elements inside <div> elements:
Example
div p {
    background-color: yellow;
}
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation