css - JQuery UI with icon on the right side of an hyperlink -
i'm trying place icon (using jquery ui theme) on right side of hyperlink. best satisfactory result had icon on far right side of page, , not after actual text. easiest option have <img>
tag after text, icon needs styled current theme.
this have :
.... <a href="#" id="contractlink" target="_blank" class="left-margin"> <span id="contractlinktext">loading...</span> </a> ... <script type="text/javascript"> $(function() { $('#contractlink') .append($('<div></div>') .addclass('ui-icon ui-icon-newwin') .css({'float':'right', 'border':'1px solid blue'}) ); }); </script>
you can make icon display:inline-block
or display:inline
. not sure effect have on icon in browsers, although put on same line span. since jqueryui css makes display:block
, maybe isn't advisable.
alternatively, can make span float:left
.
both of above work, , in both cases should remove float:right
on icon div.
Comments
Post a Comment