Prestashop Module's CSS Override

冷暖自知 提交于 2019-12-13 21:26:32

问题


I'm new to Prestashop. I want to override the CSS file of a module, say blockpermanentlinks. The official documentation says that I have to put the new CSS file in /themes/my_theme/css/modules/my_module/my_module.css.

It doesn't work. The line

<link href="/prestashop/themes/my_theme/css/modules/blockpermanentlinks/blockpermanentlinks.css" rel="stylesheet" type="text/css" media="all" />

is produced but if I visit that CSS file with my browser a 'Page not found' is displayed.

Any hints?


回答1:


Seems like you've answered your own question. The instructions were to put your CSS file in

/themes/my_theme/...

and you've linked to it at

/prestashop/themes/my_theme/...

Try

<link href="/themes/my_theme/css/modules/blockpermanentlinks/blockpermanentlinks.css" rel="stylesheet" type="text/css" media="all" />

It's hard to say anything more without a link to your site.




回答2:


You can override the CSS file of a module:

go to /themes/{your_theme}/blockpermanentlinks/css/blockpermanentlinks.css




回答3:


Try this path:

/themes/my_theme/css/modules/blockpermanentlinks/blockpermanentlinks.css

delete /cache/class_index.php and make sure to turn on the option from admin as Force Compilation, I hope this will solve your issue.




回答4:


if you need to override only some selectors/properties you can create a custom.css file in:

/themes/my_theme/css/autoload/custom.css

instead of override the entire css file



来源:https://stackoverflow.com/questions/15343000/prestashop-modules-css-override

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!