I am trying to align my text in the span tag
to center of the input field
. But when i used the "text-align": center
in my css, it is not working.
When i changed the span tag
to paragraph tag
my input field
become big.
the code:
<div class="nxui-form-group">
<label for="external-realisation">
<img src="assets/images/purchase_order.svg" class="nxui-icon-small nxui-icon-align-bottom">
{{ 'i18n.all-damage-reports.label.external-realisation' | translate }}
</label>
<div *ngIf="!isExternal">
{{ 'i18n.all-damage-reports.label.without-order' | translate }}
</div>
<div *ngIf="isExternal" class="nxui-label-plus-field">
<span class="nxui-non-breakable-label">{{ 'i18n.all-damage-reports.label.with-order' | translate }} </span>
<input [nxuiPlaceholder]="'i18n.all-damage-reports.label.external-realisation' | translate"
[title]="'i18n.all-damage-reports.label.external-realisation' | translate"
class="nxui-form-control"
formControlName="company"
id="external-realisation"
pInputText
>
</div>
</div>
It looks like this when i added the paragraph tag
:
Answer to my question:
.nxui-label-plus-field {
display: flex;
align-items: center;
}
.nxui-non-breakable-label {
white-space:nowrap ;
}
highly appreciated for the inputs.
Thanks