Emily Theophilou
Posts: 0
Joined: Mon Apr 07, 2014 3:27 pm

Background image / CSS

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Background image / CSS

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

Emily Theophilou
Posts: 0
Joined: Mon Apr 07, 2014 3:27 pm

Background image / CSS

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?

Emily Theophilou
Posts: 0
Joined: Mon Apr 07, 2014 3:27 pm

Background image / CSS

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.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Background image / CSS

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...

Return to “Issues”