how to add background images using css in phonegap


I am making a tab for mobile device in phonegap. I want to add image as background for the tabs. The problem is that it does not add any background image. here is my directory structure

images are in this folder


In css below I am using path to images like this url(./img/tabs.png) top left no-repeat; which does not work. here is are my css files


here is are all of my pages located


and here is my css

footer {
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    padding: 0;
    background: #535353; 

footer ul {
    margin: 0;
    padding: 0;
    list-style-type: none; 

footer ul li {
    float: left;
    padding: 5% 10.9%;
    background: url(./img/tabs.png) top left no-repeat; 

footer ul li a {
    width: 100%;
    height: 100%;
    color: #fff;
    text-decoration: none; 

footer ul li a .current {
    background: url(./img/tabs.png) bottom left no-repeat; 

here is my html

<section id="wrapper">
    <div id="scroll-content">

        <li><a href="#">Home</a></li>
        <li><a href="#">Profile</a></li>
        <li><a href="#">Photo</a></li>
Problem courtesy of: 2619


Your image url is not ok.

In fact, the url you provide to the path of your image should be related to the location of your CSS file.

So, you need to use:


instead of:


Have a try and let me know if this works

Solution courtesy of: Littm


There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.