Page 1 of 2

Background images CSS

Posted: Mon Dec 22, 2014 12:50 pm
by Alexandre

I'm trying to put a background image on a "mobilecontainer" as following code:

.background3 {
background-image: transparent url("images/back_960x640.png") !important;
background-size:cover;
}

But does not work, what's wrong?

Thank U.


Background images CSS

Posted: Mon Dec 22, 2014 1:14 pm
by Maryna Brodina

Hello!

Weight of your rule is not enough to override default one in the theme
This document describes ho to make a "strong" CSS rule
http://css-tricks.com/specifics-on-cs...


Background images CSS

Posted: Mon Dec 22, 2014 4:24 pm
by Alexandre

What is the path to the images? I'm trying to use:

background-image: url(images/back_960x640.png);

But does not work.

Iam trying this too:

.ui-content {
background-color: transparent;
background-image: url("images/back_960x640.png") !important;
}

and

.ui-content.startScreen_mobilecontainer1 {
background-image: url("images/back_960x640.png");
}

butt does not work


Background images CSS

Posted: Tue Dec 23, 2014 12:25 am
by Yurii Orishchuk

Hi Alexandre,

Here is correct path to your media manager images:

pre

#Screen2_mobilecontainer{
/* you should change "a_01.jpeg" with file name you need. */
background: url(../../../../files/views/assets/image/a_01.jpeg) no-repeat;
}

/pre

Regards.


Background images CSS

Posted: Tue Dec 23, 2014 1:22 pm
by Alexandre

Still not working. I tried this:

.startScreen_mobilecontainer1{
background: url(../../../../files/views/assets/image/back_960x640.png) no-repeat;
}

And this

#startScreen_mobilecontainer1{
background: url(../../../../files/views/assets/image/back_960x640.png) no-repeat;
}

And this

#startScreen_mobilecontainer1{
background: url("../../../../files/views/assets/image/back_960x640.png") no-repeat;
}

And this

.startScreen_mobilecontainer1{
background: url("../../../../files/views/assets/image/back_960x640.png") no-repeat;
}

But nothing worked. What's wrong?

But it works when I use JavaScrip with the code below:

Apperyio ("mobilecontainer1"). Css ({
"background-image", "url (" + Apperyio.getImagePath ("back_960x640.png") + ")"
"background-size", "contain '"
"background-repeat", "no-repeat"
})

The problem of using javascript can not I use CSS Media Query (@media)


Background images CSS

Posted: Tue Dec 23, 2014 11:31 pm
by Yurii Orishchuk

Hi Alexandre,

You have incorrect rule.

Please follow comments below:

pre

//Where "Screen2" is your goal page name. You don't need to change "_mobilecontainer" part.
#Screen2_mobilecontainer{
/* you should change "a_01.jpeg" with file name you need. */
background: url(../../../../files/views/assets/image/a_01.jpeg) no-repeat;
}

/pre

Regards.


Background images CSS

Posted: Wed Dec 24, 2014 1:16 am
by Alexandre

Still not work! I tried this:

.startScreen_mobilecontainer{

Code: Select all

     /* you should change "a_01.jpeg" with file name you need. */ 

background: url(../../../../files/views/assets/image/back_960x640.png) no-repeat;

}

and

#startScreen_mobilecontainer{

Code: Select all

     /* you should change "a_01.jpeg" with file name you need. */ 

background: url(../../../../files/views/assets/image/back_960x640.png) no-repeat;

}

Please, I share my app to a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a, you can see and give me a feedback?

thanks.


Background images CSS

Posted: Wed Dec 24, 2014 4:22 am
by Yurii Orishchuk

Hi Alexandre,

I tried your app. And can not see the problem.

Here is what is see.
http://prntscr.com/5kd6b4/direct

Regards.


Background images CSS

Posted: Wed Dec 24, 2014 1:10 pm
by Alexandre

I am surprise! What code you use? This:

#startScreen_mobilecontainer{

/* you should change "a_01.jpeg" with file name you need. */

background: url(../../../../files/views/assets/image/back_960x640.png) no-repeat;

}

I tried and not work.


Background images CSS

Posted: Wed Dec 24, 2014 11:51 pm
by Yurii Orishchuk

Hi Alexandre,

I see following now: http://prntscr.com/5kncbv/direct

Details: http://prntscr.com/5knd22/direct

So it seems your media query not correct for your testing environment.

Regards.