Gdzie robie błąd ?:
W szablonie głownym dorzuciłem
<h:outputStylesheet name="style.css" />
cały kod szablonu poniżej
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
<head>
<title><ui:insert name="title">TEST</ui:insert></title>
<h:outputStylesheet name="style.css" />
</head>
<body>
<div id="header">
<ui:insert name="header">
TESTOWANIE JSF
</ui:insert>
</div>
<div id="content">
<ui:insert name="content">
</ui:insert>
</div>
<div id="footer">
<ui:insert name="footer">
(c) KonradD
</ui:insert>
</div>
</body>
</html>
Następnie stworzyłem plik style.css w WebContent\resources\style.css
i wrzuciłem do niego treść. Z tego co wiem można dodawać id elementów lub tworzyć całe klasy.
Niestety uruchamiając index.xhtml szerokość przyciskow sie nie zmienia
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 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">
<ui:composition template="/szablon.xhtml">
<ui:define name="content">
<h:panelGrid id="grid" columns="3">
<h:commandButton id="przyciskDodaj" value="Dodaj" class="przycisk"></h:commandButton>
<h:commandButton id="przyciskUsun" value="Usun"></h:commandButton>
<h:commandButton id="przyciskZmien" value="Zmien"></h:commandButton>
</h:panelGrid>
</ui:define>
</ui:composition>
</html>