2 Replies Latest reply on Jun 11, 2008 5:49 PM by Sergey Smirnov

    Adding stylesheets to page not working

    Janet Barbeau Newbie

      command to add a stylesheet to a page has no affect - I have to use the <a4j:loadStyle> to add a stylesheet. Is this the case or am I just doing this incorrectly?

      ex:
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">




      does not work -
      however
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">

      <a4j:loadStyle src="/css/theme.css"></a4j:loadStyle>
      <a4j:loadStyle src="/css/test.css"/>
      does work - even when I get rid of the skin?? I am trying to get a print-friendly web page & can't because a4j:loadStyle does not have a media attribute. Thanks for any help!