Jquery UI button - css to make custom icon always appear before text, no matter how long is the text -
i using jquery ui asp.net button place custom icon on button.
in css, using margin move cusom icon. if text longer need change margin.
is there way place icon alway before text, no matter how long button text. (i don't have create separate css different buttons)
jquery asp.net button
$(function () { $("input:submit").button({ icons: { primary: 'cssbox-okbtn' } }).hide().after('<button>').next().button({ icons: { primary: 'cssbox-okbtn' }, label: $("input:submit").val() }).click(function (event) { event.preventdefault(); $(this).prev().click(); }); });
cusom buttom css
.cssbox-okbtn { background-image: url('/images/easyui/icons/ok.png') !important; margin: 95px; }
asp.net page
<td align="center"> <asp:button id="btnlogin"" text=" login " runat="server" /> </td>
Comments
Post a Comment