tags:

views:

104

answers:

1

On the Themeroller page, the author of jQuery UI shows that there are icons available if you use certain keywords. Example:

<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-close">
<span class="ui-icon ui-icon-circle-close">
</span>
</li>

This creates a nice little X in the middle of a circle, framed by a box with rounded corners and a border.

But what if my icons are not in a list? What if they're in a table cell for instance?

<td>
<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-close">
<span class="ui-icon ui-icon-triangle-1-s"></span>
</li>
</td>

This works, although it's not technically correct, because I don't have an opening and closing < ul> element.

Do I use

<td class="showcities">
<span class="ui-state-default ui-corner-all" title=".ui-icon-circle-close">
<span class="ui-icon ui-icon-triangle-1-s">
</span>
</span>
</td>

If so, what should the css be to define the ui-corner-all the same as the Themeroller example?

+1  A: 

Instead of span, use <div> here, like this

<td class="showcities">
  <div class="ui-state-default ui-corner-all" title=".ui-icon-circle-close">
    <span class="ui-icon ui-icon-triangle-1-s"></span>
  </div>
</td>
Nick Craver
Thanks Nick! They're a little bit wider than the example page, but I think I might be able to style them.
cf_PhillipSenn