Oladunni Faith Posted August 12, 2021 Share Posted August 12, 2021 Hello anyone, so today I created an html page layout and styled it with CSS, Everything seems to be working well except the background image won't display when I send the HTML file to my Phone. Tried searching answers elsewhere but to no avail..... can someone please help on this? Here's the code I used: .head{ background-color: #817c7c; background: url(testube.png) no-repeat left, url(testing.png) no-repeat right; width: 100vw; height: 30vh; overflow: hidden; position: relative; margin: 0; padding: 0; } .body{ font-family: Arial, Helvetica, sans-serif; background-color: darkgray; background: url(microscope.png) center/cover no-repeat; font-size: medium; width: 100vw; height: 50vw; padding: 5px; margin: 0; overflow: auto; position: relative; } .foot{ width: 100vw; height: 10vh; background-color: #817c7c; background: url(plain.jpg) center/cover repeat; text-align: center; overflow: hidden; margin: 0; padding: 0; } Link to comment Share on other sites More sharing options...
Ingolme Posted August 12, 2021 Share Posted August 12, 2021 The image needs to be sent to the phone as well and it needs to be located in the same folder as the file that has the CSS code in it. If you're opening the page directly from your phone's filesystem then there is the possibility that a security feature in the browser is preventing websites from loading resources directly from the phone's filesystem. Link to comment Share on other sites More sharing options...
Oladunni Faith Posted August 12, 2021 Author Share Posted August 12, 2021 Ohh... Ok thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now