Generate HTML, Javascript or CSS to hug text to any pre-defined shape.
This HTML/CSS compliant Text Hugger allows you to easily make a HTML text area into a shape and not just the default rectangle. You can make text hug curves, zig-zags, or whatever you want. All you have to do is draw the left and right edges below and then copy the generated code to your web page/site.
Tested in Internet Explorer 6+, Firefox, Safari, Opera, and Netscape.
Alternative content
There are three different ways to apply the hugging shape to your site. Each has it's benefits/drawbacks, but with these three you should be able to find a method that suits you.
This is the fully generated HTML/CSS code. It's really bulky, but it's the easiest to apply.
1. Copy and Paste this code into your site, right above the start of your text content.
This is the fully generated HTML with class names. Smaller markup, but you will need to have a stylesheet for this to work.
1. Copy and Paste the text below into your site's stylesheet.
2. Copy and Paste this code into your site, right above the start of your text content.
The most lightweight, applies two lines of javascript to generate the hugging markup. It requires the loading of a small external javascript file.
1. Save and then upload this javascript file onto your site.
Download: shapehugger.js
2. Copy and Paste this code into your site, right above the start of your text content.