-3

I am using primefaces I would like to put all my css in a separate file css. when I put my style into the same page xhtml,it's work with me, like :

<h:body>

    <div style="height:200px;width:100%;background-color:#E9F3FF">

    </div>
</h:body>

but when I put my css in a separate file it's doesn't work with me ,like

    <h:body>
<h:outputStylesheet library="css" name="style.css" />
        <div class="index_center_text">

        </div>
    </h:body>

or

<h:head>
<h:link  rel="stylesheet" type="text/css" href="/resources/css/style.css" />
<h:body>

            <div class="index_center_text">

            </div>
</h:body>

style.css :

.index_center_text{

height:200px;
width:100%;
background-color:#E9F3FF

}

Folder structure

WebContent
 |-- META-INF
 |-- resources
 |    |-- css
 |    |    `-- style.css
 |    `-- images
 |         |-- logo.png
 |-- WEB-INF
 |    |-- lib
 |    |-- faces-config.xml
 |    |-- web.xml
 |         
 |-- index.xhtml

please anybody can help me !

laciane
  • 17
  • 3
  • @Anonymous you're right , do you have an answer please – laciane Jun 21 '15 at 16:02
  • No, I've never used that language. I would only say your path may be wrong, but it seems you've already checked that. Still, posting the same question again is not okay. – Anonymous Jun 21 '15 at 16:24
  • If you want to draw more attention to a question, you can read [this meta question](http://meta.stackexchange.com/questions/7046/how-do-i-get-attention-for-old-unanswered-questions). – Anonymous Jun 21 '15 at 16:50
  • ok thank you so much @Anonymous – laciane Jun 21 '15 at 18:41

1 Answers1

-1

This should work for you.

<h:head>
<link rel="stylesheet" type="text/css" href="resources/css/style.css"/>
</h:head>
Dijana Cukic
  • 196
  • 1
  • 9