vertical alignment

The vertical-align property allows you to set the vertical alignment between several in-line elements that belong to the same parent (eg - same table cell) The possible values are
PropertiesDescription
baseline | top | bottom | middle | sub | super | text-top | text-bottom
<length> or <percentage>
snippet
<html>
<head>
    <style>
        span {border:1px solid red;}
    </style>
</head>
<body>
    <table>
        <tr>
            <td>
                <span style="vertical-align: baseline;">baseline</span>
                <span style="vertical-align: top;">top</span>
                <span style="vertical-align: bottom;">bottom</span>
                <span style="vertical-align: middle;">middle</span>
                <span style="vertical-align: sub;">sub</span>
                <span style="vertical-align: super;">super</span>
                <span style="vertical-align: text-top;">text-top</span>
                <span style="vertical-align: 300%;">300%</span>
                <span style="vertical-align: -5px;">-50px</span>
            </td>
        </tr>
    </table>
</body>
</html>
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +