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
ankethaanketha 

adding stylesheet

How can I add a stylesheet using visualforce in a apex page? I tried adding stylesheet through $Resource...But I'm not able to add the stylesheet to the apex page.Please help.

Best Answer chosen by Admin (Salesforce Developers) 
vcassvcass

All Answers

vcassvcass
This was selected as the best answer
krprkrpr

for example you save ur style sheet as TestStyles under Static Resources

 

use this in visualforce page

 

<apex:stylesheet value="{!$Resource.TestStyles}"/>
ankethaanketha

Thanks..That link really helped in adding the visualforce page into apex.

Ulas KutukUlas Kutuk

You can also set between style tags,to use inner css

 

<style>

div.get-involved
{
 overflow:auto;
 height:195px;
 width:212px;

}
</style>