Problem getting image on <p:commandButton>
Posted: 12 Jan 2012, 17:49
This seems like a simple thing, but I'm having a problem getting it to work.
I'm trying to display an image on top of a command button so just the image is visible.
Following the users guide, I have the following button definition in my page.
<p:commandButton style="top: 300px; left: 530px; position: absolute;" icon="loginBtn" action="#{sessionBean1.processLogin}" />
In my css file I have:
I suspect the url is correct because if I add the following to my css file, I get the image as a page background.
Ther problem is that I am not seeing the image on the button.
What am I doing wrong?
Thanks
I'm trying to display an image on top of a command button so just the image is visible.
Following the users guide, I have the following button definition in my page.
<p:commandButton style="top: 300px; left: 530px; position: absolute;" icon="loginBtn" action="#{sessionBean1.processLogin}" />
In my css file I have:
Code: Select all
.loginBtn {
background-image: url('../Images/bone.gif') !important;
}
Code: Select all
body {
background-image: url('../Images/bone.gif');
}
What am I doing wrong?
Thanks