Is it possible to style JSF commandbutton tags to look like th开发者_开发技巧e following example:
http://www.bloggerswatch.com/internet/css-trick-submit-button-should-look-same-everywhere/
It works for the commandlink/
Yes, you should be able to do something similar using slightly different CSS that incorporates the images as CSS backgrounds rather than <img>
tags:
Markup
<div class="buttons">
<h:commandButton value="Button Text" styleClass="apply"/>
<h:commandButton value="Button Text" styleClass="cross"/>
</div>
CSS
.buttons input {
margin: 5px;
padding: 5px 5px 5px 20px; /* 20px makes room for your background image */
border: 1px solid #aaa;
}
.buttons .apply {
background: #eee url(path/to/apply.png) no-repeat 0 50%;
}
.buttons .cross {
background: #eee url(path/to/cross.png) no-repeat 0 50%;
}
精彩评论