How to increase width only on homepage? If I change style.css it will affect the other ones.

Read something about <reference> but not sure how to accomplish that.

1 Answer 1


TL;DR: In your CSS, filter for the class: .cms-index-index.

Explanation: Magento adds classes to the body tag based on (mostly) the url that is passed in. Here is a list of a few that may be helpful:

  • .catalog-product-view: product page
  • .checkout-cart-index: viewing the cart
  • .checkout-onepage-index: onepage checkout
  • .checkout-onepage-success: checkout success
  • .cms-page-view: CMS page

In addition, CMS pages convert the path into a dash-based list (changing all separating characters to be hyphens), and append that to cms-. This would make /about.html to have the class cms-about-html and the page /folder/file.html to have the class cms-folder-file.html.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.