simonetb Posted October 12, 2018 Share Posted October 12, 2018 Hi, I want insert in a .tpl file of module Prestashop 1.7.1.0 an image that i want show ONLY in mobile version of site. I tried: <div class="visible-xs"> <img src="...etc "/> </div> but image is visible in all version of my site. How i Can? Thank you! Link to comment Share on other sites More sharing options...
NemoPS Posted October 13, 2018 Share Posted October 13, 2018 I guess make a specific class like "showonmobile" and set a rule in your custom.css file so that it has display:none, then a media query with size < 480px and display:block Link to comment Share on other sites More sharing options...
jstillings1 Posted October 15, 2018 Share Posted October 15, 2018 NemoPS is a expert! CSS hacks are greater then tpl mods simply cause of auto update. Any mods you do might be wiped on update. I would personally use the banner module for this and display none it on anything not mobile via Media queries just like NemoPS said. That way you don't add tpl stuff and you survive an upgrade Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now