Find your content:

Search form

You are here

Problem adding css to Visualforce Page

 
Share

Inline css is working. But I'm unable to call from an external css the same code.

Following is in VF..

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

And my style.css content in Static Resource...

  <style type="text/css">
   div.col1{
   background-color: #ccffcc;
   }
   div{
       float:left;
      }
       div.border{

      border-style:outset;
      border-width:6px;
      }
     .errorClass {
      background-color: red;
     }
    .normalClass {
     background-color: green;
     }
    .inProgressClass {
    background-color: #33CCFF;
    }
   .centerClass
    {
    align:center;
   }
  </style>

Attribution to: MnZ

Possible Suggestion/Solution #1

URLFOR is used when style sheet exist under zipped folder. In your case try this:

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


Attribution to: Jaffer Ali
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/32991

My Block Status

My Block Content