Trying to have a 'cover' or 100% auto scaled background image


#1

Hello all,

I’m trying to setup a Cloudforms server with a custom background image. I have uploaded an image that is 1280 x 1000. It looks fine on a small screen, but starts to duplicate on a higher res screen.

I have tried to edit;
/var/www/miq/vmdb/app/assets/stylesheets/main.css

to show;
body.whitelabel {
background: url("#{$img-path}/#{$img-bg-login-whitelabel}");
background-size: 100% auto;
}

But after a restart there is no change.

I’m probably not doing it right, but no changes to the css files seem to have an effect after a restart. Any help is appreciated!


#2

@epwinchell Thoughts here?


#3

@renebod Your change is correct. Please, clean your browser cache. Also, run: “rake assets:clean” and
"rake assets:precompile." Please, let me know if you still have a problem.


#4

Thanks a lot @epwinchell!

I’ve managed to fix what I wanted with these tips. At first it didn’t work, because I edited the main.css file from the app/assets/stylesheets location. Later I found productization/assets/stylesheets . . . there I included the line and after a new precompile, everything works like a charm!

Thanks again! :slightly_smiling: