+ Start a Discussion
siva@shiva.comsiva@shiva.com 

how to get background image in css

i created visual force page ,in that i need background image in css file .it does not invoke .please help me .

Navatar_DbSupNavatar_DbSup

Hi,


Add the entire images directory and the parent CSS file into a single zip. For example, if the zip file resource name is myStyles, refer to it like this:
<apex:stylesheet value="{!URLFOR($Resource.myStyles, 'styles.css')}"/>

 

For more detail follow the below link:


http://www.salesforce.com/us/developer/docs/pages/Content/pages_styling_custom.htm
http://www.forcetree.com/2009/07/visualforce-page-with-css.html

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

Big VBig V

optionall you can try this. store the image in your static resources and name it as 'backgroundimage'

 

in vf

 

<apex:page>

<body style="background-image:url('{!URLFOR($Resources.backgroundimage)}');">

 

your  vf contents........

 

 

</body>

</apex:page>

siva@shiva.comsiva@shiva.com

thaks