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
Sudhir_MeruSudhir_Meru 

Visual force not referencing external css file

Hi, 

  I created a css file inside folder name cssexample 

style.css file name
================
h1
{
  text-align:center;
  color:green;
}


made 
cssexample.zip and uploaded in static resources


I am calling in visual force page it is not referencing Please suggest me what is the issue

<apex:page standardstylesheets="false" showheader="false">

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

<h1> This text is displayed using CSS </h1>
</apex:page>
Best Answer chosen by Sudhir_Meru
Shyam BhundiaShyam Bhundia
Hi,  It seems like your CSS is in a folder called cssexample, so you need to put that when you are referencing the css...

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


All Answers

Shyam BhundiaShyam Bhundia
Hi,  It seems like your CSS is in a folder called cssexample, so you need to put that when you are referencing the css...

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


This was selected as the best answer
Sudhir_MeruSudhir_Meru
Thanks Shyam it worked