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 !