Solved

background image won't fill screen on my android phone

Posted on 2016-08-04
6
43 Views
Last Modified: 2016-08-31
The background image of this page fills the screen on my computer but not on my LG Stylo. Please take a look at the css and html and let me know how to remedy that. www.dijitalrealm.com/JCMusic/Jukebox2.html.

Thanks,
John
0
Comment
Question by:gabrielPennyback
6 Comments
 
LVL 21

Accepted Solution

by:
Kim Walker earned 168 total points
ID: 41743685
I don't see anything in your code that would change the size of the background image based on screen size. So it should extend way beyond the left and right sides and bottom of your android phone screen. But it would be clipped at the edges of the body element of which it is the background image. So if it isn't filling the screen of your phone, that would suggest that the body element doesn't fill the screen. Is the color of the area that isn't filled with the image dark gray? The background color for your body is dark gray which should appear anywhere the image doesn't cover the body element. If it is not dark gray, then the body element is somehow smaller than the screen.

Since you have established the left and right margin of your body element to auto, if the body element is somehow narrower than the screen, there should be a white area on both the left and right sides. Is this the case on your phone?

By the way, the background-position property is usually expressed in two values, one for horizontal and one for vertical positions. When only one value is supplied, the other value defaults to center. So background-position: top; equates to background-position: center top; and background-position: left; equates to background-position: left center.
0
 
LVL 41

Assisted Solution

by:Jackie Man
Jackie Man earned 166 total points
ID: 41744042
Your web page appears to be pretty normal for a webpage as you have not put the following code before your content html.

<div id="wrapper">

A lot of sites don't span the full screen length (i.e. fixed width sites), so webmasters use a "wrapper" to set the appropriate width and act as a full screen would.

Source: https://www.sitepoint.com/community/t/why-do-most-developers-put-div-id-wrapper-firstly/4515
0
 
LVL 24

Assisted Solution

by:lenamtl
lenamtl earned 166 total points
ID: 41752821
Try to add the viewport Meta t your page to see if this fix the problem.

 <!-- Tell the browser to be responsive to screen width -->
 <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

Open in new window

1
 
LVL 1

Author Comment

by:gabrielPennyback
ID: 41758526
Thank you for your help on this, guys. lenamtl, I meant to split the points evenly between the 3 of you but i hit the wrong button before finishing and you got left out. I don't know how to re-do the awarding process so please forgive me.

~ John
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Detecting robots? 5 34
CSS Divs in Safari 3 18
targeting between desktop and responsive menu 3 17
get curent GPS location 1 22
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now