Images resizable in phone

Images resizable in phone

by Simon Eidenskog -
Number of replies: 1

Hi!

I'm using Moodle 3.2 with the Boost theme. 

I want images (which has a width of say about 700 px) posted for example on Home page, in forums, or as a label in a course to be resized when viewing In phone, so the whole width fit in to the iPhonescreen. (If there's an easy solution, it would be an option with a link in a new tag to full resolution image.)


In additional HTML, whitin HEAD, I've tried to add: 


 <style>

img {

    height: auto;

}

</style> 


In Raw SCSS (in Boost theme), I'ved also tried:


img {

    height: auto;

}


but with no result.


Thankful for your help!

Regards Simon

Average of ratings: -
In reply to Simon Eidenskog

Re: Images resizable in phone

by Diane Soini -

I think you need to also add a width: 100% to both those rules. You may need to wrap the rules in a media query, too.