0

I am trying to get rid of the 1px solid borders automatically created when using the PrimeFaces p:panelGrid, but yet all my attempts to do so fail.

I tried to integrate a style.css doing:

<h:body>
    <f:facet name="last">
        <h:outputStylesheet library="default" name="css/style.css" />
    </f:facet>
    // more code here
</h:body>

But when I check in the resulting HTML given back by the application server (I use Wildfly 8) I am unable to finde an entry like <link type="text/css" rel="stylesheet" href="css/style.css" />. And because of this missing CSS-entry I am not able to perform any CSS-changes within my document like killing the borders of p:panelGrid.

What must I do to integrate the CSS to get rid of the borders in p:panelGrid?

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
Socrates
  • 8,724
  • 25
  • 66
  • 113
  • When I do this it works: `` but it doesn't work when I do this ``. If I use the `h:outputStylesheet` the HTML produced looks like this ``. – Socrates Aug 31 '15 at 05:19
  • What is location of your CSS file in your workspace and why don't you try F12 on your browser and check this unwanted borders – vinod Aug 31 '15 at 19:32
  • The location of the CSS file in my workspace is `myproject/src/main/webapp/css/style.css`. I solved the border problem earlier using F12 in Firefox. But the `h:outputStylesheet` problem still remains. Any idea? – Socrates Aug 31 '15 at 19:42
  • It should be webapp/resources/css/style.css – vinod Aug 31 '15 at 19:45
  • Ok, tried both, putting the style.css in `webapp/resources/css/` (which I had to create first, and putting `webapp/resources/css/style.css` into `h:outputStylesheet`. I hope I understood you the way you intended, but it still does not work. – Socrates Aug 31 '15 at 19:56
  • I changed it to `` now, but within the HTML page it is coded like `` and hence does not work. Any ideas? – Socrates Aug 31 '15 at 20:18
  • Nope. `` generates `` – Socrates Aug 31 '15 at 20:31
  • And hence does not work. – Socrates Aug 31 '15 at 20:31
  • Ok don't use output style inside facet remove it and use after body anyhow u will get the css – vinod Aug 31 '15 at 20:34
  • For detail help use below link http://www.mkyong.com/jsf2/how-to-include-cascading-style-sheets-css-in-jsf/ – vinod Aug 31 '15 at 20:36
  • Yeah, tried it, but still doesn't work. I now have `` and the resulting HTML is ``. I already tried to follow mkyoung.com's tutorial, but it doesn't seem to work for me. – Socrates Aug 31 '15 at 20:44

0 Answers0