Fix IE6 Double Margin(Box Model Hack) bug

Box Model Hack
Author: Alessandro Coscia
The problem
IE doesn't implement the correct (standard) box model, so box appears with different dimensions in different browsers.
W3C's standard explains the correct model to adopt: Box Model.
This is a good image (coming from Wikipedia) to understand the problem:

Solutions
There are some solutions: Hack one-half margin value for IE/win only
Set display: inline
Use jquery.fixBoxModel.js (compatible with prototype, mootools and scriptaculous!!!)
Solution: Use jquery.fixBoxModel.js
I wrote this plugin to solve this problem.
Solution: Use jquery.fixBoxModel.js
I wrote this plugin to solve this problem.
It is very simple to use: include the libraries between <head>
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="js/jquery.fixBoxModel.js" type="text/javascript"></script>
code using:
<script>
  var $j = jQuery.noConflict();
  $j('document').ready(function () {
    $j('div').fixBoxModel();
  });
</script>
detail here
http://www.programmatorephp.it/jquery/ie6-double-margin-hack.php

Nhận xét

Bài đăng phổ biến từ blog này

Ký tự viết tắt trong chat & email

dung lượng RAM lớn nhất mà HĐH cấu trúc 32-bit nhận được

Ubuntu LAMP Server