Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to Include My Own .CSS FIle
 
franco13
Sr. Member
 
Total Posts:  91
Joined:  2012-09-12
 

I made a hardcoded tweak to the css for the template I am using on my Magento site.

My preference is to create my own .css file and add it in the <head> section of the pages.

Is there a way through the admin control panel to do this? I want to avoid doing anything within the directories via FTP because my changes would be subject to overwrite and/or deletion upon an upgrade.

Thanks,

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagikSwapna
Sr. Member
 
Total Posts:  97
Joined:  2010-12-14
 

Hello,

You can easily add your own CSS through admin pannel.
Go to CMS -> Pages open your home page
Under Design -> Page Layout -> Layout Update XML
add your css like this

<reference name="head">
<action method="addCss"><stylesheet>css/YOURCSS.css</stylesheet></action>
</reference>

 
Magento Community Magento Community
Magento Community
Magento Community
 
franco13
Sr. Member
 
Total Posts:  91
Joined:  2012-09-12
 

First of all, that is pretty cool (and easy) @MagikSwapna

However, it only happened on my home page. I actually only need my css tweak for the compare page pop-up window.

Here are my CMS > Pages options:
About about
Customer Service customer-service
Enable Cookies enable-cookies
My Site home
home home-grayscale
404 Not Found 1 no-routePreview
Privacy Policy privacy-policy-cookie-restriction-mode

Second, I see that the css file to be loaded will live in `/skin/frontend/base/default/css/` . What happens to that css file when I upgrade Magento?

Thanks,

 
Magento Community Magento Community
Magento Community
Magento Community
 
a_stelmakh
Jr. Member
 
Avatar
Total Posts:  11
Joined:  2012-11-04
 

If you upgrade the magento, the CSS file will not be modified

 
Magento Community Magento Community
Magento Community
Magento Community
 
franco13
Sr. Member
 
Total Posts:  91
Joined:  2012-09-12
 

Thank you @a_stelmakh

Does anyone know how I can locate the template page the controls the Product Compare Pop-up window? It is not in my admin CMS > Pages list.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top