Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Background-size: cover suddenly stopped working in Google Chrome?

Is anyone else having this issue? I create websites for a living, and some employ the use of the css property background-size: cover. All of the sudden about 1 week ago, all of the sites with this property no longer display right in Google Chrome. (all other browsers are working fine.) Is anyone else experiencing this? Is it just MY google chrome or did something change? Because the backgrounds were displaying properly until about a week ago, and I did not change anything. They just stopped displaying properly, seemingly out of nowhere....

like image 912
malfy Avatar asked Aug 04 '12 18:08

malfy


People also ask

Why does my background image not cover the whole page?

Try setting your header to height: 100% . Alternatively (the better solution), set the background on the body if you want it to cover the whole page.

How do I stop Google Chrome from changing my background?

Stop Chrome from Running the BackgroundOpen the Chrome browser and then click on its icon on the Taskbar. Uncheck the “Let Google Chrome run in the background” link. That's it. Now, it will no longer run or display notifications when you exit the browser.


2 Answers

Best practice: always set background-image first and then background-size.

like image 137
malfy Avatar answered Sep 22 '22 06:09

malfy


You only need to use !important :

background-size: cover !important; 
like image 43
gregs67 Avatar answered Sep 22 '22 06:09

gregs67