私は次のような連絡先フォームを作成しようとしています。commandButtonの幅を設定する
+----------------+-------------------+
| Name: | |
+----------------+-------------------+
| Email Address: | |
+----------------+-------------------+
| Website: | |
+----------------+-------------------+
| Comment: | |
+----------------+-------------------+
| Send |
+------------------------------------+
これまでのところ、ラベルとテキストをグリッドに配置しました。 私のボタンはこのように見えます。
...
+----------------+-------------------+
| Comment: | |
+----------------+-------------------+
| Send |
+------+
しかし、最初のもののように見え、他のコンポーネントの幅と揃えたいと思っています。
<p:panelGrid columns="2">
<h:outputLabel value="Name:" />
<p:inputText value="#{contactFormController.name}" required="true" />
<h:outputLabel value="Email Address:" />
<p:inputText value="#{contactFormController.email}" required="true" />
<h:outputLabel value="Website:" />
<p:inputText value="#{contactFormController.website}" required="false" />
<h:outputText value="Comment:" />
<p:inputText value="#{contactFormController.comment}" required="true" />
<p:commandButton value="Send" actionListener="#{contactFormController.sentMail}"/>
</p:panelGrid>
レンダリングされたCCSとHTMLを投稿して、何を提案するか確認してください。 – LGSon
これは私の.xhtmlコードブロックです。私はプライムフェイスの元のCSSを上書きしませんでした。 –