Posted By

haxd on 01/08/09


Tagged

fix js ie margin jquery ie6 duplicate bug internet explorer characters double jQ


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

haxd
Bluewall
silentbob84


IE6 Double Margin Bug / Duplicate Characters Bug Fix using jQuery


 / 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.

  1. $('*').each(function() {
  2. if ($(this).css('float') !== 'none') {
  3. $(this).css('display', 'inline');
  4. }
  5. });

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Flocke on November 25, 2009

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.

You need to login to post a comment.