+ Start a Discussion
bujjibujji 

Regarding static resources image in .css file

Hi Guys,

 

i using a image which is coming from the .css file. If i am logged into salesforce, than i am able to see the image. But i am exposing vf page using sites in that scenario it is not visible.
 The belwo is the .css code how it is refrencing

 

#templatemo_header #site_logo1 {
    float: left;
    width: 340px;
    height: 100px;
    background:url(https://ap1.salesforce.com/resource/1369383790000/biz_left_button) no-repeat;
}

 

I tried the below option also, but it didn;t worked.

background: url("{!$Resource.biz_left_button}") no-repeat;

 

Any suggestions please.

 

Thanks,

Bujji

kranjankranjan

Hi bujji,

 

You can either use relative URL isntead of full URL. or you cna put your image in a static resource and then use it from there. Something like this {!URLFOR($Resource.<ResourceName>, 'folder/image.jpg')}". You need to replace the resourceName and the relative path of the image under the folder structure when creating a static resource. Hope this helps.

 

Regards

bujjibujji
i tried all those it is not working.

Thanks,
Bujji
kranjankranjan

Bujji,

 

Did you use URL function or URLFOR?