开发者

Make ui-icon appear on same line as other text within <li>

I'm bad with CSS, and I'm trying to get the ui-icon on the same line as the text in a LI.

<ul>
    <li class="ui-state-default">
        <span>Hello</span>
        <span class="ui-icon ui-icon-close"></span>
    </li>
</ul>

Normally text doesn't do that within a li, so I think it's something with the ui-icon css, but开发者_StackOverflow社区 I couldn't find what was causing it.


Further to my question comment above, I've found this in my jQuery-ui CSS, assuming that's what you're using:

/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }

Changing (or overriding) the display: block using display: inline-block should allow the icon to appear on the same line

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜