This question already has an answer here:

*In my custom block I want to add custom stylesheet to display the block as like i want. How it can be possible.

marked as duplicate by brentwpeterson, Fabian Schmengler, Amit Bera, Keyul Shah, Rajeev K Tomy Aug 24 '16 at 9:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


First, you should add the css file:

  1. Add next line inside your module's layout file or inside your theme local.xml layout file (example path for the rwd theme: app/design/frontend/rwd/default/layout/local.xml):

        <reference name="head">
            <action method="addCss"><stylesheet>css/custom.css</stylesheet></action>
  2. Create file inside the skin folder of your theme:

  3. Then you should add an unique identifier for your block (block's template). For that purpose use the id or class attributes. Detect the template file (.phtml) and add something like this:

    <div id="my-own-block-unique-identifier">
        <!-- other content here -->
  4. Next, write your css rules in the created css file using the unique identifier like this:

    #my-own-block-unique-identifier { color:red; }
  • Thanks .. Its works. – Nasrin Nabim Aug 9 '16 at 12:18
  • @NasrinNabim If it works, please, mark the answer as solution – Siarhey Uchukhlebau Aug 9 '16 at 12:32

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