1
You need to make a decision: either you do this server-side or client-side.
Server side requires a plugin written in php, while the client side a script written in Javascript. I would only use the client side if pixel-perfect alignment to other parts of the page is required.
Should you choose to write the plugin, it is very easy, write a Content plugin which ...
Only top voted, non community-wiki answers of a minimum length are eligible