.indexOf function on an array not working in IE7/8 using JavaScript

On IE<9 indexOf() it is not “well” implemented. Try to add this function on your code : if (!Array.prototype.indexOf) { Array.prototype.indexOf = function(elt /*, from*/) { var len = this.length; var from = Number(arguments[1]) || 0; from = (from < 0) ? Math.ceil(from) : Math.floor(from); if (from < 0) from += len; for (; from … Read more

How to fix Internet explorer 7 bug when using percentage widths for layout?

The problem is sub-pixel rounding. When you are designing with percentages there will be times that the math doesn’t result in full pixels (70% of 721px is 504.7px). 721 is arbitrary, but using percentages you’ll run into arbitrary numbers. There’s no avoiding that. Most browsers figure out a rounding solution for you that doesn’t break … Read more

Pseudo class :hover does not work in IE7

IE7 won’t allow you to apply :hover pseudo-classes to non-anchor elements unless you explicitly specify a doctype. Just add a doctype declaration to your page and it should work perfectly. <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”> More on IE7/quirks mode can be found on this blog post.

IE7, IE8 support for css3 media query [duplicate]

Include this meta tag in the <head>. <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> Internet Explorer 8 or older doesn’t support media query. You can use media-queries.js or respond.js to add media query support in IE. <!–[if lt IE 9]> <script src=”http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js”></script> <![endif]–> I think this two links will help you. http://cssmatter.com/blog/ie7-and-ie8-support-for-css3-media-query/ http://webdesignerwall.com/tutorials/responsive-design-in-3-steps/comment-page-2 Update css3-mediaqueries-js is moved on … Read more

IE7 and the CSS table-cell property

I’ve solved this using jQuery: $(document).ready(function(){ if ($.browser.msie && $.browser.version == 7) { $(“.tablecell”).wrap(“<td />”); $(“.tablerow”).wrap(“<tr />”); $(“.table”).wrapInner(“<table />”); } }); the above script assumes you have divs using style such as: <style> .table { display: table; } .tablerow { display: table-row; } .tablecell { display: table-cell; } </style>

How to get “position:fixed” css to work in IE 7+ with TRANSITIONAL doctype?

You don’t need a Strict DOCTYPE for fixed support. You only need a DOCTYPE that triggers Standards Mode (or ‘almost standards’). That can be a transitional doctype such as: <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> or XHTML: <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> as long as the system ID (the URI … Read more