簡體   English   中英

如何將按鈕中的文本居中對齊?

[英]How to align the text in the button to the center?

我為此問題努力了很長時間,並嘗試了許多與stackOverflow中的主題相似的解決方案,但無法解決我的問題。 這是我的代碼:

<p:commandButton id="verifyButtonId" value="Verify" ajax="true" actionListener="#{LocationEditBean.verifyAccess}" update="panelVerifyMessageId" style="height:25px; line-height:25px; vertical-align:middle;" rendered="#{LocationEditBean.showVerify}">
                                <f:param value="#{LocationEditBean.classifiedObject.ID}" name="editId"/>
                            </p:commandButton>

commandButton中的文本不能與垂直中心對齊。 誰能幫我這個?

you can try adding the following style to your button:

style=
  "font-family: Arial, Helvetica, sans-serif;
  font-weight: normal;
  color: #444;
  min-width: 90px;
  padding:5px;
  margin: 5px 10px;
  background-color: #fdfdfd;
  border: 1px solid #cdcdcd;
  cursor: pointer;
  border-radius: 3px;"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM