You need to sign in to do that
Don't have an account?
MrTik
Background image for a page
Hi, All,
How can I put an background image on my visualforce page? I have the following code in the page.
<apex:stylesheet value="{!$Resource.style00}" />
<body id="tab3">
The first line gets the reference to the stylesheet. In the stylesheet I have a body element defined and this is where the image is defined and is not being rendered. Is there a way to make sure that the image is rendered in the background of the page?
Really appreciate all the help.
Please try this -
<apex:page standardStylesheets="false" showHeader="false" >
<body style="background-image:url('{!$Resource.backgroundimg}');">
</body>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
I tried this, however the background does not get reflected. The best solution that I can make to work so far is have the images hosted on publicly accessible web site and access the image in CSS from there. If any one has better / cleaner way to make it work please let me know.
Regards.
Make sure that Cache control is set to public on the static resource settings.
And try what Pradeep_Navatar suggested again.
Let me know if it works.
Ignacio.