Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery UI icons issue

Hello, why does the icons do a br> itself

Heres what i mean:

alt text

Source:

.ui-icon-bullet { background-position: -80px -144px; }
    <span class="ui-icon ui-icon-bullet"></span> Hello
like image 785
Karem Avatar asked Jul 10 '10 15:07

Karem


1 Answers

If you take a look at the JQuery UI CSS theme file, you will notice that

.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }

So any element with the class ui-icon will be displayed as a block (therefore a <br /> before and after) You can change this behavior by applying a float left to your icon element to make it left of your text

Something like

<span class="ui-icon ui-icon-bullet" style="float:left;"></span> Hello

will do

like image 96
Yanick Rochon Avatar answered Nov 09 '22 17:11

Yanick Rochon