Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

background image won't fill screen on my android phone

Posted on 2016-08-04
6
Medium Priority
?
64 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 22

Accepted Solution

by:
Kim Walker earned 672 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 48

Assisted Solution

by:Jackie Man
Jackie Man earned 664 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 26

Assisted Solution

by:lenamtl
lenamtl earned 664 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

721 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