Vicente Paul Posted May 11, 2017 Share Posted May 11, 2017 Anybody knows what need to be added in the classic theme theme.css file to size corretly the images in mobile? See the picture in attachment (images are natively 640px width, html without the parameter "width=..." to let the css handle the rendering). Thanks! Link to comment Share on other sites More sharing options...
gabdara Posted May 11, 2017 Share Posted May 11, 2017 You could add to your img tag class="img-fluid" or edit file themes/classic/assets/css/custom.css and add: #cms img { max-width: 100%; height: auto; } This will make all the images in CMS pages to be responsive. More, if you care about serving images optimized for mobile devices dive into https://responsiveimages.org 1 Link to comment Share on other sites More sharing options...
Vicente Paul Posted May 11, 2017 Author Share Posted May 11, 2017 Thanks! Link to comment Share on other sites More sharing options...
Anatchim Posted November 29, 2017 Share Posted November 29, 2017 ...I just tried this, and didn't worked for me maybe I'm not doing something?... the images on cms pages are still width oversized on the mobile version Link to comment Share on other sites More sharing options...
Anatchim Posted November 30, 2017 Share Posted November 30, 2017 I did the workaround of adding class="img-fluid" to each individual image, wich does work. Editing the custom.css file doesn't unfortunatelly doesn't work Link to comment Share on other sites More sharing options...
Prestachio Posted January 7, 2021 Share Posted January 7, 2021 (edited) On 11/30/2017 at 4:57 PM, Anatchim said: I did the workaround of adding class="img-fluid" to each individual image, wich does work. Editing the custom.css file doesn't unfortunatelly doesn't work Same for me. Anyone a hint how to do it via custom.css? PS 1.7.6.9 Edited January 7, 2021 by Prestachio (see edit history) Link to comment Share on other sites More sharing options...
Prestachio Posted January 7, 2021 Share Posted January 7, 2021 Ah, no, now it's working. Seems that it took a few minutes after I cleared the cache.. 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