How to put text on the right side of an input in a vertically centered way?

0

I'm validating an input, and in doing so, when the values entered are not valid, an alert is displayed (so far so good). However aesthetically it does not look very good, so I wanted to know if it is possible to align the text shown so that it is more centered vertically with the input next to it, I will leave an image so that it is better understood

  <div class="row">
    <div class="col-lg-2">
      <div class="form-group">
       <label>Rut</label>
       <input class="form-control" name="rut" id="rut" type="text">
     </div>
    </div>
    <div class="col-lg-3">
      <div class="form-group">
        <span class="hide" id="msg_rut" style="color:red;">Rut Invalido</span>
        <div id="resultado"></div>
      </div>
    </div>
 </div>

I am also open to suggestions on how to display an alert of this kind in a more aesthetic way for users, if you have a suggestion I would appreciate it

    
asked by Kvothe_0077 26.06.2018 в 03:17
source

1 answer

0

Your span needs a little adjustment with css, it should look like this:

<span class="hide" id="msg_rut" style="color:red;position: absolute;margin-top: 30px;">Rut Invalido</span>
    
answered by 26.06.2018 / 03:47
source