Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am working on asp.net,c#,bootstrap classes,css classes. i want to make grid responsive for this i use footable code by bootstrap class. what i need is that when will i compress the screen or my page will view on mobile or tablet it will show sign of plus or minus for the details which are hide from the screen while it became mobile screen.... i have done with code and executing properly but i come across the error when i click on plus sign i want minus sign in the place of plus sign but "failed to load the given url" error is there.. i have set image path properly but it is not getting the path.... what to do please help me.

What I have tried:

JavaScript
.footable.breakpoint > tbody > tr > td.expand {
        background: url(../Icons/plus.png) no-repeat 5px center;
        padding-left: 40px;
    }

    .footable.breakpoint > tbody > tr.footable-detail-show > td.expand {
        background: url(../Icons/minus-1.png) no-repeat 5px center;
    }
Posted
Updated 24-Apr-16 22:11pm
v2
Comments
Prasad Khandekar 25-Apr-16 3:00am    
Try opening Developer Tools and inspect the element. In Firefox/Chrome developer tools hovering the cursor over background CSS rule will show you the image if it's not showing up then it means there is a URL error.

1 solution

Your url is a relative path. It will not work the same in different url depths.

From www.mysite.com/home.aspx it will go to www.mysite.com/Icons/...
but from www.mysite.com/about/contact.aspx it will go to www.mysite.com/about/Icons...

The solution is to use as absolute path. /Icons will always go to www.mysite.com/Icons

Change your css as follows:

JavaScript
.footable.breakpoint > tbody > tr > td.expand {
        background: url(/Icons/plus.png) no-repeat 5px center;
        padding-left: 40px;
    }
 
    .footable.breakpoint > tbody > tr.footable-detail-show > td.expand {
        background: url(/Icons/minus-1.png) no-repeat 5px center;
    }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900