cross-browser

Cross-browser method for getting width and height of a DIV?

纵然是瞬间 提交于 2019-12-08 00:50:00
问题 This is my first post, so please go easy on me. I'm sure I'm doing everything wrong. However, I couldn't find any posts that answered the question above. I use jQuery. I'm trying to find a way to get the current width and height of a DIV element, even if they're set to "auto". I've found many ways to do this, but no method returns the same width in IE. It is important that this method is cross-browser, as it will break the layout of the page if different numbers are returned in different

Background images are flashing when changing pages - only in IE

喜夏-厌秋 提交于 2019-12-07 23:29:33
问题 In IE9, when changing pages with the same background image, it is 'flashing'. In Firefox changing pages remain smooth, no refreshing or blinking of the background images. When looking at the http traffic, the header for the images is 304 - so they shouldn't be refreshed. Can I do something about this? When you click this link with IE9 you can see the testpage This is the profile IE Developer F12 makes: 来源: https://stackoverflow.com/questions/15245774/background-images-are-flashing-when

What is the difference between “javascript:”, “#”, and “javascript:false” in iframe.src attribute

穿精又带淫゛_ 提交于 2019-12-07 21:37:08
问题 If I want to set the src of iframe with these 3 value. I found: javascript: doesn't work in IE10 (error is can't find the page). other mainstream browsers or IE9 is ok. javascript:false will show a false string in the iframe for IE10, others browsers or IE9 is ok. # works fine in all the browsers. What is the difference between them? Which one is the best choice for cross-browser issues? 回答1: Try using about:blank as the URL. This should display a blank page in all browsers. http://tools.ietf

Will you still support IE6 when writing webpages?

荒凉一梦 提交于 2019-12-07 20:30:24
问题 It needs a lot of work to make the webpages render correctly in IE6. Other browsers (like FF, Safari) are fine because they usually follow the W3C standard better. Even IE7 is better than IE6 (although its acid 3 test score is only 14/100). I would like to know how many people still care about IE6 when developing webpages. If you still work hard to deal with IE6, what is the right time you think you can get rid of it? 回答1: I have to :( Some customers are still using IE6 as a company-policy,

Docusaurus fails with IE: Object doesn't support property or method 'assign'

蓝咒 提交于 2019-12-07 20:14:51
问题 We are making a V2 Docusaurus website: https://www.10studio.tech. We have just realized that it does not work well in IE, for instance, IE11. The error message is: Object doesn't support property or method 'assign' . There are some packages to provide with IE compatibility such as core-js , but we don't know how to properly add it to Docusaurus v2. Does anyone know how to amend this? 回答1: The error message is telling you that object doesn't have an assign function . assign is a function which

How to vertically align text across browsers

人盡茶涼 提交于 2019-12-07 19:17:59
问题 Please note that I have been through the existing links on this topic and none seem to help in my case. All suggest a way of how to move the text vertically so that it appears aligned. The problem in my case is that it is already aligned in Chrome, so when I try to align the text for Firefox then it misaligns the text in Chrome. Please open the following link in Firefox (v12) and Chrome (v19). http://jsfiddle.net/UQ4D5/ You will notice that it is shifted towards the top in Firefox but is

Shorthand animation working only in Chrome

情到浓时终转凉″ 提交于 2019-12-07 19:06:04
问题 In Chrome, the following CSS3 animation works as I would expect, rendering an animation of the outline. However, in Internet Explorer and Firefox, this doesn't work. @keyframes outline-pulse { 0% { outline: 10px solid green; } 100% { outline: 0px solid green; } } .animate { animation: outline-pulse 1s linear 0; animation-iteration-count: infinite; } <fieldset class="animate"> <p>Content</p> </fieldset> 回答1: This appears to be due to an oversight in the WD. In particular, it does not take into

How to read DOM of the iframe loaded with a page from another domain?

China☆狼群 提交于 2019-12-07 18:37:13
问题 Is there a way to access the DOM of the document in an iframe from parent doc if the doc in the iframe is on another domain? I can easily access it if both parent and child pages are on the same domain, but I need to be able to do that when they are on different domains. If not, maybe there is some other way to READ the contents of an iframe (one consideration was to create an ActiveX control, since this would be for internal corporate use only, but I would prefer it to be cross-browser

Float left in a div does not work in IE7 but does in Firefox and IE8

拜拜、爱过 提交于 2019-12-07 16:14:09
问题 When I have three divs that all have float left I want the sections to expand or contract based on how long the data inside them is. For instance, if the 1st address is very long I want the 1st box to expand and push the 2nd one over. In Firefox it is doing this but in Internet Explorer it requires a width to look right. In IE7 it doesn't display right at all - each div has a table with two columns and in IE7 it shows the 2nd column way over to the far side of the page instead of snug with

Background color for drop down menu options is not working in Safari, Chrome + MAC

亡梦爱人 提交于 2019-12-07 16:02:25
问题 I have a drop down box where I am setting background color of options as gray based on some conditions. The problem is its all work fine with almost browser on windows machine but its not working in Safari & Chrome on MAC OS. I used color as: Color name: Gray , hex color code: #CCCCCC and with rgb(204,204,204) but all of three isn't working. I done goggling and found that there is some problem with safari in MAC. I am not sure how to fix this. There is an open post at mac forums which didn't