2013-01-04 66 views
1

我有一個號碼:commandLink在XHTML頁面如何刪除p:commendlink中的邊框?

​​

的CSS:

.deleteBinButtonLnk { width: 17px; height: 19px; 
         border-style: none !important; 
         padding: 2px 2px; 
         background: url('../images/buttons/delete_bin_off.png') 
         no-repeat; 
} 

.deleteBinButtonLnk:hover{ width: 17px; height: 19px; 
          border: none; 
          background: url('../images/buttons/delete_bin_on.png') 
          no-repeat; 

這裏顯示的邊界在小時圖像:graphicImage的。 我不需要邊框。

請告訴解決方案。

+1

我認爲這個答案會幫助你http://stackoverflow.com/a/10224573/1692632 – Darka

回答

0

我明白了。

的styleClass而不是<h:graphicImage>

<p:commandLink 
    styleClass="accountEditBtn" 
    update="@form" 
    actionListener="#{someBean.someListener}" 
</p:commandLink> 

CSS類

.accountEditBtn { background-image: url('../resources/image/pencil_black.png'); }