function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
pradeepkumar battapradeepkumar batta 

about vf page color

Hi Every body,

i have requirement like the vf page color should be yellow and different pageblock,pageblocksection should have different colors how can we achive this .please ket me know.one thing i want discuss with you i was used inline styles but i am not getting any thing .
Best Answer chosen by pradeepkumar batta
pradeepkumar battapradeepkumar batta
Thank you Abhishek ,Now its working fine.

All Answers

Abhishek BansalAbhishek Bansal
Hi,

The style tags are available in Apex elements.
You can use style tag in apex page block and apex columns to give any color to them.
Syntax : <apex:pageBlockTable style="color:red"/>

To give any color to your VF page you can use belwo syntax :
<apex:page>
<body style="color:red"/>
</apex:page>

Let me know if you need more help on this.

Thanks,
Abhishek
pradeepkumar battapradeepkumar batta

Hi Abhishek Bansal
But its not working for page .
Abhishek BansalAbhishek Bansal
Hi,

For Vf page styling you have to use html body tag and than apply all stylings on this body tag:

Please see the below syntax for giving style to VF page :

<apex:page>
    <body style="background-color:red"//any other styles>
        //Your all page elements will come here
    </body>
</apex:page>

Thanks,
Abhishek
pradeepkumar battapradeepkumar batta
Thank you Abhishek ,Now its working fine.
This was selected as the best answer