In Magento 2, there is a box to place custom CSS to any block. enter image description here

However, I don't see that as an option in Magento 1 enter image description here

How do I add custom CSS to a block in Magento 1?

Edit for possible dupe: I want to know how to just add some css to a block, is there not a way to just do that in Magento 1? Do I have to create a custom css and layout class for every block? If that is the case, can I have someone explain a little more clearly how to do this?

Edit for comments: It won't save an in file style block enter image description here enter image description here

  • 1
    Possible duplicate of Custom css for custom block/phtml. – MagenX Jun 4 '19 at 16:37
  • do not use magento interface for css updates, create custom css file with custom path and keep all your changes. – MagenX Jun 4 '19 at 16:38
  • I looked at that question but I don't really understand the answer – Morgan Smith Jun 4 '19 at 16:45
  • Why does the interface exist if I'm not suppose to use it? – Morgan Smith Jun 4 '19 at 16:46
  • You can directly add css using <style> tag – Pawan Jun 4 '19 at 17:17

Not exactly same as M2 but you can do it via Design tab > Layout as XML

So edit CMS page, add XML entry to Lauout as XML. Make sure your js and css is in place and you have following options.


To add a CSS file residing in the skin CSS folder

   <reference name="head">
      <action method="addCss">

To add a Javascript file residing in the skin JS folder

   <reference name="head">
      <action method="addItem">

To add a Javascript file residing in the {magentoroot}/js folder

   <reference name="head">
      <action method="addJs">

For blocks you will need extension

Someone posted this online


Cant say for certain it works

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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