Page 2 of 3
How do i re-size a background image to fit the screen?
Posted: Tue Mar 12, 2013 1:05 am
by David Andrews
Figured it out. Here is the whole code that is working now.
Tiggzi('mobilecontainer1').css('background-image','url("' + Tiggzi.getImagePath('Poster_Background_Only_1024_Light.jpg') + '")');
Tiggzi('mobilecontainer1').css('background-repeat','no-repeat');
Tiggzi('mobilecontainer1').css('background-size','cover');
How do i re-size a background image to fit the screen?
Posted: Tue Mar 12, 2013 6:26 am
by Maryna Brodina
Hello! Thank you for sharing code
How do i re-size a background image to fit the screen?
Posted: Mon Oct 28, 2013 12:52 pm
by laura Gómez
My background image doesn't adapt to the different screens.
I load this code:
$('div[dsid="mobilecontainer1"]').css('background-image',
'url("https://dl.dropboxusercontent.com/u/1...")')
$('div[dsid="mobilecontainer1"]').css('background-size','cover');
but I get this result.
How do i re-size a background image to fit the screen?
Posted: Mon Oct 28, 2013 12:52 pm
by laura Gómez
How do i re-size a background image to fit the screen?
How do i re-size a background image to fit the screen?
Posted: Mon Oct 28, 2013 2:17 pm
by Maryna Brodina
How do i re-size a background image to fit the screen?
Posted: Mon Oct 28, 2013 3:12 pm
by laura Gómez
I've read this forum, but image doesn't fit.
my code is:
Appery("mobilecontainer1").css('background-image','url("https://dl.dropboxusercontent.com/u/1...")');
Appery("mobilecontainer1").css('background-size','cover');
Appery("mobilecontainer1").css('background-position','center');
Appery("mobilecontainer1").css('position', 'absolute');
Appery("mobilecontainer1").css('width', '100%')
1382973113" alt=""
How do i re-size a background image to fit the screen?
Posted: Mon Oct 28, 2013 5:26 pm
by Maryna Brodina
Please try the following code on page Show event
prevar mobilecontainer1 = $.mobile.activePage.find('[data-role="content"]');
mobilecontainer1.css('background-image', 'url("https://dl.dropboxusercontent.com/u/134459352/fondoportadatam.jpg")')
mobilecontainer1.css('background-size','100% 100%');/pre
How do i re-size a background image to fit the screen?
Posted: Mon Nov 11, 2013 4:51 pm
by Jay6395558
When I try to cover the entire screen with my background image it gets cut off on larger screen sizes. Like this...
How do I get the image to proportionally resize to every screen size? The image I am using is 970 px x 970 px so it should be large enough no matter what screen size.
How do i re-size a background image to fit the screen?
Posted: Tue Nov 12, 2013 2:13 pm
by Kateryna Grynko
Hi Jay,
We cannot reproduce such problem. Please give us a public link to your application.
How do i re-size a background image to fit the screen?
Posted: Tue Nov 12, 2013 2:53 pm
by Jay6395558