Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS background-image not working

I don't know what is going on but it seems that the background image isn't loading.

test.html:

<div class="pToolContainer">
     <span class="btn-pTool">
         <a class="btn-pToolName" href="#"></a>
     </span>
     <div class="pToolSlidePanel"></div>
</div>

style.css:

    .btn-pTool{
    margin:0;
    padding:0;
    background-image: url(slide_button.png);
    background-repeat:no-repeat;
    }

    .btn-pToolName{
        text-align: center; 
        width: 26px; 
        height: 190px; 
        display: block; 
        color: #fff; 
        text-decoration: none;  
        font-family: Arial, Helvetica, sans-serif;  
        font-weight: bold; 
        font-size: 1em; 
        line-height: 32px; 
    }

By the way the image does exist in the folder of test.html.

like image 924
Twidizle Avatar asked Feb 01 '11 05:02

Twidizle


1 Answers

Add "display:block;" in your .btn-pTool class

like image 123
Manny Avatar answered Oct 16 '22 00:10

Manny