-2

I have this piece of code:

          <div 
               *ngIf="loginForm.get('username').errors.required"
               class="md-margin--s md-margin__horizontal--l">
            <i class="icon icon-clear_20 i-class-top"></i>
            <span class="md-margin__left--s">Please Enter Username</span>
          </div>

This is the result in the UI:

enter image description here

I am not able to place the text at the center vertically.

pranami
  • 1,381
  • 5
  • 22
  • 43
  • Does this answer your question? [Margin top in inline element](https://stackoverflow.com/questions/10324527/margin-top-in-inline-element) – Amith Jul 07 '21 at 07:34

1 Answers1

0

you should add a class to with below CSS:

.wrapper{
display:flex;
align-items:center;
justify-content:flex-start;
}