Tuesday, August 20, 2013

CSS text vertical align

<html>
<head>
<style type="text/css">
img.top {vertical-align:text-top}
img.super {vertical-align:super}
</style>
</head>

<body>

<p>An <img src="logo.jpg" alt="Systech" width="224" height="63" /> image inside a paragraph, with a default vertical alignment.</p>

<p>An <img class="top" src="logo.jpg" alt="Systech" width="224" height="63" /> image inside a paragraph, with a text-top alignment.</p>

<p>An <img class="super" src="logo.jpg" alt="Systech" width="224" height="63" /> image inside a paragraph, with a text-bottom alignment.</p>

</body>
</html>

Result

No comments: