cross-browser

3 pixels extra space in IE6

浪子不回头ぞ 提交于 2020-01-03 20:02:05
问题 Could someone please work out what's happening here, and how I could fix it? I'm testing this page in IE6, IE7, FF and Chrome, and it works in everything but IE6. In that, there is a small gap between the edge of the chickens picture and the div it's in. I hate IE6. 回答1: This may be the "three pixel jog" bug that shows in IE6 but not later versions of IE. See http://www.positioniseverything.net/explorer/threepxtest.html for example. 回答2: Using a CSS Reset can help! Lots of inconsistencies

Browser support for getElementsByTagNameNS

谁都会走 提交于 2020-01-03 18:15:11
问题 Which browsers/versions support getElementsByTagNameNS() , and to which extent? I can't seem to find a good reference. [Edit] I am interested in a complete reference, but my immediate need is for namespaced xml returned from an AJAX call (which jQuery doesn't seem to handle btw). 回答1: Sitepoint says Firefox as of version 1.5, Safari as of version 3 and Opera as of version 9. Firefox versions lower than 3.6 did a case insensitive search which as corrected in version 3.6. Microsoft claims to

jQuery :nth-child not working in IE

强颜欢笑 提交于 2020-01-03 16:55:29
问题 I am using this code $('.list-item:nth-child(5n)').after('<div class="clear"><img src="http://domain.com/image.jpg" width="780" height="80" alt="banner" /></div>') This works fine in Firefox and Chrome but not working in IE8, IE9... 回答1: jQuery handles nth-child in the absense of native browser support. It works just fine in IE7, 8 and 9+. Fiddle: http://jsfiddle.net/jonathansampson/Y3MP4/ 回答2: nth-child is not supported in IE 6-8. IE9 has support for it. See here. See this question for a

get the auto computed margin in firefox with jQuery

你离开我真会死。 提交于 2020-01-03 13:00:11
问题 With the markup and css below, I tried to get the computed left-margin of shell. <section class="page-title"> <div class="shell"> <h5 class="title">Welcome!</h5> </div> </section> .shell { zoom: 1; max-width: 1000px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; } Using parseInt($('.shell').css('marginLeft')) it works in Chrome, Safari, IE9 but surprisingly doesn't work in Firefox. Tried the other approach: ($('.shell').outerWidth(true) - $('.shell')

IE9 ignoring CSS for certain pages?

删除回忆录丶 提交于 2020-01-03 09:03:31
问题 I have different sites being served up, essentially running off the same code. One page renders correctly, while the other appears to have no CSS available. When I bring up the IE9 developer console for the broken page, I see: SEC7113: CSS was ignored due to mime type mismatch So that explains why the pages render improperly, but the question is, why am I seeing that error on one page, but not the other? Using fiddler, the same CSS is served to both sites, and both sites have a the metatag:

IE9 ignoring CSS for certain pages?

不问归期 提交于 2020-01-03 09:03:00
问题 I have different sites being served up, essentially running off the same code. One page renders correctly, while the other appears to have no CSS available. When I bring up the IE9 developer console for the broken page, I see: SEC7113: CSS was ignored due to mime type mismatch So that explains why the pages render improperly, but the question is, why am I seeing that error on one page, but not the other? Using fiddler, the same CSS is served to both sites, and both sites have a the metatag:

html datalist element auto suggest behavior

*爱你&永不变心* 提交于 2020-01-03 07:09:25
问题 I noticed that different browsers have different behavior regarding to suggesting values for a text field when you hook it up to a datalist. Some browsers show the entries which exactly starts with what you've typed(IE, older chrome versions), while others show entries which contain what you've typed as a sub-string (firefox, newer chrome versions). For example, type i into the text box, and observe the suggestions: browser: <datalist id="browsers"> <option value="Google Chrome">Google Chrome

hidden fields in IE are considered disabled?

江枫思渺然 提交于 2020-01-03 03:32:19
问题 With the below sample page I get a different output for IE than I do for other browsers. <html> <head> <title>hidden fields test</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> </head> <body> <form> <input type="hidden" value="hidden1" /> <input type="hidden" value="hidden2" /> <input type="text" value="text1" /> <input type="text" value="text2" /> </form> <script type="text/javascript"> $(function() { var inputs = $(

IE10 only given me an 'Unable to evaluate expression' error when changing style

房东的猫 提交于 2020-01-02 14:34:42
问题 I have the following javascript function to hide an HTML tag: function object_Hide_obj(objectId) { var objname=document.getElementById(objectId); if (objname) { objname.style.display = "none"; } } I have an instance where objname is a valid HTML <tr> tag. In IE10 only (works fine on IE9, IE11, Chrome, and Safari) I get a weird error on objname.style.display = "none"; . When I Try to evaluate this in the console I get a 'Unable to evaluate expression' error, and the the browser just crashes

IE10 only given me an 'Unable to evaluate expression' error when changing style

好久不见. 提交于 2020-01-02 14:33:30
问题 I have the following javascript function to hide an HTML tag: function object_Hide_obj(objectId) { var objname=document.getElementById(objectId); if (objname) { objname.style.display = "none"; } } I have an instance where objname is a valid HTML <tr> tag. In IE10 only (works fine on IE9, IE11, Chrome, and Safari) I get a weird error on objname.style.display = "none"; . When I Try to evaluate this in the console I get a 'Unable to evaluate expression' error, and the the browser just crashes