You need to sign in to do that
Don't have an account?
srinu vas
background image
iam unable add background image in vf pages by below code
css code:
<style type="text/css">
body { background-image: url("{!URLFOR($Resource.myStyles, 'images/logo1.gif')}")
}
and i zipped image and css file added into static source
apex code:
<apex:page showHeader="false" sidebar="false">
<apex:stylesheet value="{!URLFOR($Resource.example, 'example.css')}"/>
</apex:page>
please solve my problem
css code:
<style type="text/css">
body { background-image: url("{!URLFOR($Resource.myStyles, 'images/logo1.gif')}")
}
and i zipped image and css file added into static source
apex code:
<apex:page showHeader="false" sidebar="false">
<apex:stylesheet value="{!URLFOR($Resource.example, 'example.css')}"/>
</apex:page>
please solve my problem
<apex:image url="{!URLFOR($Resource.example, 'images/Bluehills.jpg')}" width="50" height="50" />
Reference : http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_image.htm
Your Code Syntex Is Correct. Is Your Static Resource Is Public. and Check Your Zip File Name Or Its Path Is Correct.
Thanx And Regards
Gopal Rathore
-
i have written a code like
-
i have place mybackground.gif image into images folder
-
created css name with mystyle.css file having code
-
body {background-image: url(mybackground.gif);}
-
both images and css files places into zip file
-
uploaded into static source named as MyStaticResources
-
apex code
<apex:page showHeader="false"><apex:stylesheet value="{!URLFOR($Resource.MyStaticResources, 'mystyle.css')}"/>
</apex:page>
but it is not working please give me sugestion .........
if u have folders in your zip. so u have to follow path as zip.
like this code
in this code static reource name is MyStaticResources and mybackgroundimage.gif is in images folder and css in css folder. so i write this code. which is working.