Curly underline
Ever wanted to use un underline on a web page that looks like a spelling mistake in Word? You know, the curly red underline. It's actually very easy.
Here's an example.
All you need is:
- A small piece of the wavy line, like this
(it's stretched here for the demo purpose) - A style that uses the image as background
- Align the background at the bottom and repeat only on the x-axis
The style definition would look like:
.curly-underline { background: url(underline.gif) bottom repeat-x; }
And that's it!
I saw this working in TinyMCE, the WYSIWYG editor used by Wordpress, for displaying spelling mistakes. Really cool!
Note: If you're a frequent visitor to my site and the example doesn't work for you, chances are you're using a cached version of the CSS file.

April 6th, 2006 at 4:24 am
Nice.
May 8th, 2006 at 2:08 am
smart
December 3rd, 2006 at 9:19 am
What about your CSS coding conventions? Shouldn’t you be writing:
.curly-underline {
background-image: url(underline.gif);
background-position: bottom;
background-repeat: repeat-x;
}
December 4th, 2006 at 9:40 am
Very true, Oliver