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
softForce2014softForce2014 

How to use CSS

how to use css file 

amilawamilaw

Save CSS file as a static resource

use following in the visualforce page

<apex:stylesheet value="{!URLFOR($Resource.myCSS)}" />

Ajay_SFDCAjay_SFDC

Hi 

 

You can use the CSS in following ways :

 

1. Inline CSS :

   <apex:outputText value="Inline CSS" style="font-weight:bold; margin-left:55px;"  />

 

2. Declaring css in Page :

   <apex:page>

     <style type="text/css">

       .Dataclass{

          text-align:right;
        border-right:1px solid black;
        min-width: 150px !important;
      } 

 

   <apex:outputText value="CSS is declared " styleClass="Dataclass"/>

 </apex:page>

 

3. Creating separate file for css and Use it as Static resources and include it in a page using :

    <apex:stylesheet value="{!URLFOR($Resource.PageStaticResourcesName, '/CSSFolder/GPS_Quote_PDF_CSS.css')}"/>

 

Thanks 

Ajay