I have newcss.css
#formdiv {
width: 30%;
margin: 150 auto;
}
and composite component
<?xml version='1.0' encoding='UTF-8' ?>
<!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:h="http://xmlns.jcp.org/jsf/html"
xmlns:composite="http://java.sun.com/jsf/composite">
<composite:interface>
</composite:interface>
<composite:implementation>
<h:form id="formdiv">
...
</h:form>
</composite:implementation>
</html>
When i'm trying to use this component in index.xhtml
i cant observe any effects of CSS
applying.
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:lpform="http://xmlns.jcp.org/jsf/composite/mycomp"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<form>
<mycomp:comp/>
</form>
</html>
I need that my composite component lay at the center.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…