Jump to content

[solved] How to override an exist module's css files?


Recommended Posts

I know we can override an module's .tpl files, but why i can't override the module's .css files?

 

Below are my procedures:

1. Copy an existed module named blocklanguages from "/modules" into the directory of "/theme/my_module/modules".

2. Change the .tpl file, and the changes work.

3. Change the .css file, but it doesn't work. Why?

 

I found that the modules in the default theme just have the .tpl files, they don't have the css files. If so, how should i override an exist module's css files to change it's presentation?

 

 

Waiting your suggestion, thanks a lot.

Link to comment
Share on other sites

Thanks for your suggestiong, i use firebug to find out the module and it's css files, but now i have some issue when i override it's css file.

 

I tried to override the module of blocklanguage's background as the described in my last comment, but i can't override it's css file.

Link to comment
Share on other sites

You have a URL you could post

 

Is it this you want to change

 

background: url("img/block_languages_top_p_bg.png") no-repeat scroll right 1px transparent;

 

Or if you want to change the background colour on line 57 in the css file

 

background:#ffffff;

 

this makes a white background

 

 

 

Paul

Edited by perfumeskunk (see edit history)
Link to comment
Share on other sites

Thanks for you comments, it's helpful. I just have a try how to override an module:)

 

Should i change the file of "/modules/blocklanguages/blocklanguages.css" or just change "/theme/my_theme/modules/blocklanguages/blocklanguages.css"?

 

If i change "/modules/blocklanguages/blocklanguages.css", it will impact the upgrade of prestashop.

If i change "/theme/my_theme/modules/blocklanguages/blocklanguages.css", it doesn't work.

Link to comment
Share on other sites

  • 3 weeks later...

@ealio add css file to path /themes/MY_THEME/css/modules/blocklanguages/blocklanguages.css it will override default

@ealio add css file to path /themes/MY_THEME/css/modules/blocklanguages/blocklanguages.css it will override default

 

I also needed this ! And it works perfectly fine :) Thank you!!!

Edited by johnjasonz (see edit history)
Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...