jsf - Primefaces tabview language menu -
im having problem primefaces simple language menu. it's tabs consists of 2 elements. english , spanish.
the issue have when flags appear giant blank space appears right next flags.
the white space on right side of flags
i see no problem in code. wanted know if knows how solve it.
code:
<ul> <h:form> <li> <h:commandbutton action="#{localebean.changelanguage('en')}" value="english" image="/resources/modena-layout/images/us.png" /> </li> <li> <h:commandbutton action="#{localebean.changelanguage('es')}" value="spanish" image="/resources/modena-layout/images/es.png" /> </li> </h:form> </ul>
instead of commonbutton, maybe should try this:
<p:commandlink action="#{localebean.changelanguage('en')}" <div id="englishflag" class="englishflagclass" /> </p:commandlink>
css:
.englishflagclass { width: 24px; height: 24px; background: url("../url_to/englishflag.png") no-repeat center; background-size: 100%; margin-left: auto; margin-right: auto; display: inline-block; }
that way image link looks button. can style link css wish. maybe css properties redundant in case (i copied sample) it's start.
Comments
Post a Comment