4

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 Answer 1

5

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>
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Nick! They're a little bit wider than the example page, but I think I might be able to style them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.