Hi, using material design from google, usually we have a icon on input text
But when try to use with primefaces, it wont work, as you can see into next image, there is something to do?
InputText with icons
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Can you please attach your test code?
Github Profile: https://github.com/mertsincan
sure,
Code: Select all
<div class="card card-w-title">
<h1>Dados Básicos</h1>
<p:panelGrid columns="1" layout="grid" styleClass="ui-panelgrid-blank form-group">
<h:panelGroup styleClass="md-inputfield">
<i class="fa fa-diamond"></i>
<p:inputText id="anuncianteRazaoSocial" size="30" value="#{anuncianteBean.anunciante.razaoSocial}"/>
<p:outputLabel for="anuncianteRazaoSocial" value="Razão Social"/>
</h:panelGroup>
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Ultima doesn't support this feature. But, I overrode some css for this issue. Please try the following code;
You can change the above css style by yourself.
Also, which size are you using? Material or Compact?
Code: Select all
//CSS
<style type="text/css">
body .md-inputfield.myIconClass i:first-child{
position: absolute;
top: 1px;
}
body .md-inputfield.myIconClass input {
margin-left: 25px;
}
body .md-inputfield.myIconClass label {
left: 30px;
}
</style>
//XHTML
<div class="card card-w-title">
<h1>Dados Básicos</h1>
<p:panelGrid columns="1" layout="grid" styleClass="ui-panelgrid-blank form-group">
<h:panelGroup styleClass="md-inputfield myIconClass">
<i class="fa fa-diamond"></i>
<p:inputText id="anuncianteRazaoSocial" size="30" value="#{anuncianteBean.anunciante.razaoSocial}"/>
<p:outputLabel for="anuncianteRazaoSocial" value="Razão Social"/>
</h:panelGroup>
</p:panelGrid>
</div>
Also, which size are you using? Material or Compact?
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Glad to hear, thanks for the update!
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 12 guests