cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a custom CSS file in Magento 1.9.2.4 CE

How to add a custom CSS file in Magento 1.9.2.4 CE

Hi

We did the below to add custom css but the css file is not added while checking through 'view source'

 

1. Added local.xml in /app/design/frontend/rwd/default/layout

 

local.xml

-----------

<?xml version="1.0"?>
<layout>
<default>
<reference name="head">
<action method="addCss"><stylesheet>css/custom-css.css</stylesheet></action>
</reference>
</default>
</layout>

 

2. Added custom-css.css in /skin/frontend/rwd/default/css

 

Kindly suggest on this

 

Thanks

1 REPLY

Re: How to add a custom CSS file in Magento 1.9.2.4 CE

You need to add it in your themes 'page.xml', which should be here;

 

MAGE ROOT /app/design/frontend/XXX/YYY/layout/page.xml

Where XXX/YYY are the path to your theme.

 

Within this file, find this block;

 

<block type="page/html_head" name="head" as="head">

And add your css like this;

 

<action method="addCss"><stylesheet>css/custom.css</stylesheet></action>

Refresh your cache afterwards - including the css/js cache if you have merge enabled.

OpenSource Expert | OpenSource Technologies | www.opensourcetechnologies.com
Magento plugins released: http://www.opensourcetechnologies.com/product/product-category/magento-extensions