title: CSS not Working in JSF - what am I doing wrong?
body: <p>I have tried calling the CSS in every way possible but nothing works.
  Here are four different ways... While I was making tests, I duplicated the style.css file , so there is one in the same folder as the XML code, and there is one in the CSS folder. Both have the same content.</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
  &lt;!-- &lt;h:outputStylesheet name="style.css" library="css" /&gt; --&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://xmlns.jcp.org/jsf/html"&gt;
      &lt;h:head&gt;
          &lt;title&gt;HOME&lt;/title&gt;
          &lt;?xml-stylesheet type="text/css" href="style.css"?&gt;
  
          &lt;link rel="stylesheet" type="text/css" href="css/style.css"/&gt; 
  
          &lt;h:outputStylesheet name="style.css" library="css" /&gt;
  
          &lt;h:outputStylesheet name="css/style.css" /&gt;
  
          &lt;h:outputStylesheet name="css/style.css" library="css" /&gt;
  
          &lt;!-- &lt;ui:insert name="codecss" /&gt; --&gt;
      &lt;/h:head&gt;
      &lt;h:body &gt;
          Hello from Facelets
          &lt;h:column&gt;
              &lt;h:form&gt;
                  &lt;menu&gt;
                      &lt;ul&gt;
                          &lt;li&gt;&lt;h:commandLink value="Novo Usuário" action="novoUsuario.xhtml"/&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;h:commandLink value="Agenda de Eventos" action="agendaEventos.xhtml"/&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/menu&gt;    
              &lt;/h:form&gt;           
          &lt;/h:column&gt; 
          &lt;h:form class="teste"&gt;
              &lt;br /&gt;
              Novo Usuário&lt;br /&gt;
              Nome:&lt;h:inputText value="#{usuarioBean.nome}" /&gt;&lt;br /&gt;
              Login:&lt;h:inputText value="#{usuarioBean.login}" /&gt;&lt;br /&gt;
              Senha:&lt;h:inputSecret value="#{usuarioBean.senha}" /&gt;&lt;br /&gt;
              &lt;h:commandButton value="OK" /&gt; &lt;br /&gt;
  
          &lt;/h:form&gt;
  
          O usuário foi criado: &lt;br /&gt;
          Nome: #{usuarioBean.getNome()} &lt;br /&gt;
          Login: #{usuarioBean.getLogin()} &lt;br /&gt;
          Senha:#{usuarioBean.getSenha()} &lt;br /&gt;
  
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>the content of the css file is:</p>
  
  <pre><code>.teste{max-width:960px;margin:0 auto;}
  </code></pre>