/ Published in: JavaScript
If you've ever been frustrated at fixing multiple double margin / duplicate character bugs in your page, using this handy jQuery snippit, you can wipe them away instantly!
This code requires the latest version of jQuery.
Expand |
Embed | Plain Text
$('*').each(function() { if ($(this).css('float') !== 'none') { $(this).css('display', 'inline'); } });
Comments
Subscribe to comments
You need to login to post a comment.

Well, although this snippet is technically correct it is not good to solve the problem this way. Just add "display: inline" to every float it won't do real browsers any harm. It will only affect the doubled margin bug. There is no need to fix this bug with jQuery-help.