/ Published in: CSS
A replacement for now deprecated align attribute:
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN"> <html> <head> <title>Vertical align type with image</title> <style> p a { border: 1px solid #ccc; display: block; font-family: helvetica, arial, sans serif; font-size: 0.5em; } img.alignment { vertical-align: middle; } img.icon { width: 25px; height: 25px; margin-right: 5px; } </style> </head> <body> <p> <a href="#"><img class="alignment icon" src="images/twitter.png" alt="icon">Follow us on Twitter!</a> </p> </body> </html>