Properly center non-PrimeIcons inside a InputText Component #419
-
ProblemI am unable to center Icons inside a InputText Component from https://pictogrammers.com. I do not have those problems with Icons from PrimeVue. Trying to use an icon per documentation does only work with PrimeIcons An icon used from pictogrammers
An icon used from PrimeIcons
I tried a few different things but couldn't get it to center properly. QuestionHow can I properly center the icon from pictogrammers using PrimeFlex?
(Sorry if this is a stupid question just getting into proper web development) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you can set up a stackblitz showing the icon position issue I can probably come up with a better answer, but the style that's positioning the icon is: .p-input-icon-left > i,
.p-input-icon-left > svg,
.p-input-icon-right > i,
.p-input-icon-right > svg {
position: absolute;
top: 50%;
margin-top: -.5rem;
} This looks to be assuming the icon is 1rem x 1rem so if your new icons are slightly different, you'll need to adjust that style in you application to account for the difference. |
Beta Was this translation helpful? Give feedback.
If you can set up a stackblitz showing the icon position issue I can probably come up with a better answer, but the style that's positioning the icon is:
This looks to be assuming the icon is 1rem x 1rem so if your new icons are slightly different, you'll need to adjust that style in you application to account for the difference.