topher

I noticed a cool little feature on mā’ona the other day, and thought I’d give it a shot.  Basically, you make a class that just sets the font style to italics, puts a border on the bottom, and make the cursor have the question mark next to it:

.define {
  border-bottom: 1px dotted;
  font-style: italic;
  cursor: help;
}

Then in your HTML you do something like this:

<span class="define" title="This is a definition">Define me!</span>

And you get something like this:

Define me!

Pretty slick eh? Thanks Alan!

One thought on “Nice CSS widget

  1. I guess the most interesting part of that is that you can set give a title to any old span for mouseover purposes. Cool!

Leave a Reply

Your email address will not be published.