mobileapp css background image problems on monaca

267 views Asked by At

I am new to building apps with monaca. I have built a lot of websites with css and html , so am very familiar with the language . Anyway , when i give a background image to the navigation bar with css like this

 background: url(img/header.png);

it works in the preview emulator, but when i run/sync it with my phone the image doesnt show on it. i am running it on my samsung galaxy s5 I am beginning to wonder if theres a right way of doing it on monaca.

1

There are 1 answers

0
Fran Dios On BEST ANSWER

Try to add this property to the style of your toolbar: background-size: contain. It works for me in Monaca preview and debugger. For some reason the image size is different.

More info here: https://developer.mozilla.org/en-US/docs/Web/CSS/background-size