Page 1 of 1

Background image / CSS

Posted: Fri Apr 11, 2014 6:40 pm
by Emily Theophilou

Hi, im trying to edit the css file to create an interface for my app. I want to put an image as the background but I cant get it working.
So far I've uploaded the image in the media manager and I have added the following code into a css file.
.Background,MainScreen_mobilecontainer,ui-content,ui-body-b{
background-image:url('cathedral.jpg');
}

Do I have to specify a route for the image?


Background image / CSS

Posted: Fri Apr 11, 2014 7:16 pm
by Kateryna Grynko

Hi Emily,

Use this code please:pre.Background .MainScreen_mobilecontainer .ui-content .ui-body-b{
background-image:url('cathedral.jpg');
}/pre
You can use this to get the image URL if you need:
preAppery.getImagePath('imageName')/pre


Background image / CSS

Posted: Fri Apr 11, 2014 10:09 pm
by Emily Theophilou

Hi Katya, Thank you for the reply.
I tried the first code you suggested but its not working.
Where do I have to insert the second code?


Background image / CSS

Posted: Fri Apr 11, 2014 10:25 pm
by Emily Theophilou

Hi Katya! I got it working by getting the url of the image from the media manager.
However, I would like to ask one more thing.
Is it possible to display different css files per page?
I want to have an image background for the mainscreen but I want a plain background for the rest of the pages.


Background image / CSS

Posted: Fri Apr 11, 2014 10:42 pm
by Illya Stepanov

Hi Emily -

It's up to you and your app logic. You can change it on show page event on a particular page or you can use cascade structures, for example you can check it here:
:: http://docs.appery.io/documentation/b...