More theme: code to make banner responsive

More theme: code to make banner responsive

by Lynn McDougal -
Number of replies: 3

Hi all....this will hopefully be the easiest question anyone will answer today!

As the title says I am in need of figuring out how to insert the code in the CSS box on the front page settings that will allow my banner to be responsive.  Do I just enter  " img {max-width: 100%;}" or will that mess up the rest of the images everywhere else on the site?

Sadly I am trying to retro fit a very old design from Moodle 2.0 proper into 2.8.3+ due to a server migration and upgrade.

Thanks so much!!  (BTW, I did try a few search variations to find an answer to this before posting but didn't find anything.)

Cheers!

Lynn

Average of ratings: -
In reply to Lynn McDougal

Re: More theme: code to make banner responsive

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi, 

If the theme you are adding this banner to is the More theme, then depending on how you are adding the banner will determine what code you need to make it responsive.

if adding the Banner image into the logo, part of the More settings page, you could try something like...

a.logo { background-size: 100% auto;}

Also, just out of curiosity, which 2.0 theme did you used to use?

Cheers

Mary

In reply to Mary Evans

Re: More theme: code to make banner responsive

by Lynn McDougal -

Hi Mary!  

YAY!!  That worked!!  Thank you!

The theme (I think) was Base. (I seem to remember a message coming up about that when I tried to launch it the first time.) Not sure if that was a theme that was native to 2.0. This was all designed about four years ago and the person who was involved in doing it is no longer around so I'm just doing what I can with something that has suddenly taken the elevator to 2015 and is being upgraded by 8 versions!

But this worked beautifully...so thank you again!

Cheers!

Lynn

In reply to Lynn McDougal

Re: More theme: code to make banner responsive

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Oh great! Glad it's working ok.

Mary