Hi,
I recently upgraded from version 1.2.1 to 3.0.0 and have noticed that using the inline style "text-align:right" no longer works. Looking at the generated html, it seems that the style is applied to the <span> wrapper and not to the <input> tag. Any chance this could be fixed?
Many thanks,
Neil
pe:inputNumber - text-align not applied in v3 [unsolved]
-
- Posts: 67
- Joined: 10 Jan 2012, 14:18
Last edited by neilrichards on 19 May 2015, 17:17, edited 1 time in total.
PrimeFaces 5.3.5 | Extensions 3.2.0 | MyFaces 2.2.10 | Payara 1.6.3 (GlassFish 4.1.1)
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
every style/styleClass applies to the outer container. So no.
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
-
- Posts: 67
- Joined: 10 Jan 2012, 14:18
Sorry - that sounds like a Monday morning comment . For buttons and the calendar for example, the style property applies to the component.
With this element, and I'm guessing others like it, it used to apply to the component itself but now doesn't. There's no additional parameters to enable you to specify the style of the component, and inline styling doesn't work any longer, which only leaves writing customised style classes to override default values.
I can't see what benefit there is in applying the style to the container (a <span>) in this instance, when common style properties like alignment, colour, font and size have no impact on it, and are not inherited by the component either. Why not apply the same rules to these input components as to the buttons and the calendar? The style property as it is is worthless.
With this element, and I'm guessing others like it, it used to apply to the component itself but now doesn't. There's no additional parameters to enable you to specify the style of the component, and inline styling doesn't work any longer, which only leaves writing customised style classes to override default values.
I can't see what benefit there is in applying the style to the container (a <span>) in this instance, when common style properties like alignment, colour, font and size have no impact on it, and are not inherited by the component either. Why not apply the same rules to these input components as to the buttons and the calendar? The style property as it is is worthless.
PrimeFaces 5.3.5 | Extensions 3.2.0 | MyFaces 2.2.10 | Payara 1.6.3 (GlassFish 4.1.1)
-
- Posts: 67
- Joined: 10 Jan 2012, 14:18
Hi again,
I feel like there's a fairly compelling argument for changing this, although I'm happy to be corrected if I am wrong. Without any change it seems that we will have to declare a style class for each style combination that is required. If there is no chance of there being a change, then i will go with that - however it would be great if this could be done. Appreciate confirmation
Many thanks,
Neil
I feel like there's a fairly compelling argument for changing this, although I'm happy to be corrected if I am wrong. Without any change it seems that we will have to declare a style class for each style combination that is required. If there is no chance of there being a change, then i will go with that - however it would be great if this could be done. Appreciate confirmation
Many thanks,
Neil
PrimeFaces 5.3.5 | Extensions 3.2.0 | MyFaces 2.2.10 | Payara 1.6.3 (GlassFish 4.1.1)
-
- Posts: 3
- Joined: 23 May 2015, 16:28
Hello : same problem
I have to make a financial intranet application with a lot of inputNumber (in euros).
the style parameter with "text-align:right" doesn't work.
I tried to make a css without any result ...
I am using PF 5.2 and PF extensions 3.1
If I use PF extensions 2.0 it works ... but I cannot imagine that it is a good solution.
Any idea of a walkaround solution with PF extensions 3.1 ?
I have to make a financial intranet application with a lot of inputNumber (in euros).
the style parameter with "text-align:right" doesn't work.
I tried to make a css without any result ...
I am using PF 5.2 and PF extensions 3.1
If I use PF extensions 2.0 it works ... but I cannot imagine that it is a good solution.
Any idea of a walkaround solution with PF extensions 3.1 ?
Primefaces 5.2
Primefaces-extensions 3.1
Glassfish 4
Primefaces-extensions 3.1
Glassfish 4
-
- Posts: 9
- Joined: 04 Mar 2013, 20:50
It's only one solution. Use external css file.
.nameClass .pe-inputNumber {
...
}
and apply nameClass to pe:inputNumber with styleClass="nameClass". With primefaces-extensions v2.0 inline css work fine.
Primefaces 5.2
Primefaces-extensions 3.1.0
Glassfish 4.1
Mojarra 2.1.10
.nameClass .pe-inputNumber {
...
}
and apply nameClass to pe:inputNumber with styleClass="nameClass". With primefaces-extensions v2.0 inline css work fine.
Primefaces 5.2
Primefaces-extensions 3.1.0
Glassfish 4.1
Mojarra 2.1.10
-
- Posts: 3
- Joined: 23 May 2015, 16:28
It works !!!ltelegescu wrote:It's only one solution. Use external css file.
.nameClass .pe-inputNumber {
...
}
and apply nameClass to pe:inputNumber with styleClass="nameClass". With primefaces-extensions v2.0 inline css work fine.
Primefaces 5.2
Primefaces-extensions 3.1.0
Glassfish 4.1
Mojarra 2.1.10
Thank you very much ltelegescu !
Primefaces 5.2
Primefaces-extensions 3.1
Glassfish 4
Primefaces-extensions 3.1
Glassfish 4
I do it this way, but this does not work with Primefaces 6.0 and p:inputNumber?!Népomucène wrote:ltelegescu wrote:It's only one solution. Use external css file.
.nameClass .pe-inputNumber {
...
}
and apply nameClass to pe:inputNumber with styleClass="nameClass". With primefaces-extensions v2.0 inline css work fine.
Code: Select all
.numberRight .ui-inputnumber {
text-align:right !important;
}
<p:inputNumber styleClass="numberRight" .../>
Code: Select all
<span class="ui-inputnumber ui-widget numberRight>
<input class="ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all" ... />
</span>
PF 12.0.4
WildFly 23.0.2.Final
WildFly 23.0.2.Final
-
- Posts: 1
- Joined: 17 Dec 2016, 15:14
- Contact:
-
- Information
-
Who is online
Users browsing this forum: No registered users and 6 guests