Jump to content

Issues with background images


Oladunni Faith
 Share

Recommended Posts

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;
            backgroundurl(testube.pngno-repeat lefturl(testing.pngno-repeat right;
            width100vw;
            height30vh;
            overflowhidden;
            positionrelative;
            margin0;
            padding0;
        }
.body{
            font-familyArialHelveticasans-serif;
            background-colordarkgray;
            backgroundurl(microscope.pngcenter/cover no-repeat;
            font-sizemedium;
            width100vw;
            height50vw;
            padding5px;
            margin0;
            overflowauto;
            positionrelative;
        }
        .foot{
            width100vw;
            height10vh;
            background-color#817c7c;
            backgroundurl(plain.jpgcenter/cover repeat;
            text-aligncenter;
            overflowhidden;
            margin0;
            padding0;
        }
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...