ccc

CSS3: Alinear verticalmente una imagen con el texto

<style>
.medioLSG { vertical-align: middle; }
.topLSG { vertical-align: top; }
.baselineLSG { vertical-align: baseline; }
</style>

uno dos <img src="thelma.jpg"> tres cuatro <!-- se alinea al bottom -->
<hr>
uno dos <img class="medioLSG" src="thelma.jpg"> tres cuatro
<hr>
uno dos <img class="topLSG" src="thelma.jpg"> tres cuatro
<hr>
uno dos <img class="topBaseline" src="thelma.jpg"> tres cuatro <!-- al bottom -->
<hr>

Valores disponibles:
baseline | sub | super | top | text-top | middle | bottom | text-bottom | <porcentaje>

No hay comentarios:

Publicar un comentario