cross-browser

Background-size 100% not working in IE8 and IE7

て烟熏妆下的殇ゞ 提交于 2019-12-02 01:29:02
问题 I have an empty div which contain a background image that is bigger than the size of the container. I fix this one by background-image property with the value (100% 100%). That's fine until you open the example in IE8 and IE7. Any solutions for that, even a javascript script or jquery plugin? i.e: http://jsbin.com/imirer/1/edit i.e: http://jsfiddle.net/bPTzE/ HTML: <div class="container"> <div class="background"></div> </div> CSS: .container { /* an example width for responsive perpose */

Is it possible to create a CSS-only accordion?

醉酒当歌 提交于 2019-12-02 01:20:01
I'm thinking about using an accordion in a "please enable Javascript" page, but I don't know if it's possible with CSS only . I'm almost sure it is for most browsers, but I'm also fearing I'll face some limitation of IE and I'd like to know if any of you tried this already (or not) and could tell me if it's either possible or impossible (considering IE6+). Some CSS only Accordin here http://www.webdeveloperjuice.com/2010/05/17/8-powerful-pure-css-accordions-to-make-web-application-lite-and-impressive/ And it is IE 6 compatible http://www.cssnewbie.com/advanced-css-accordion-effect/ http://www

How do you add multiple browser specific values into a CSS style in React?

久未见 提交于 2019-12-02 01:09:31
This is mainly to define browser specific values like this one for a given CSS property: <div style="cursor: -moz-grab; cursor: -webkit-grab; cursor: grab;">Grab me!</div> If I wrap it into object like this: <div style={{ cursor: "-moz-grab", cursor: "-webkit-grab", cursor: "grab" }}>Grab me!</div> then you duplicate keys in an object (would fail in strict mode and would overwrite otherwise). And simply putting all values into single string doesn't seem to work either. Figuring out browser with JS and then applying right value seems to be too much work.. Or is there a different approach to do

localhost is therefore not allowed access

一曲冷凌霜 提交于 2019-12-02 01:00:20
问题 To solve CORS issue, I wrote there header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: GET, POST'); header("Access-Control-Allow-Headers: X-Requested-With"); in my server site but during my development I'm seeing this error The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed. Origin 'http://localhost' is therefore not allowed access. I thought allow-origin: * will solve everything? But why it says header contain

Check if the browser supports document.querySelectorAll in JavaScript

岁酱吖の 提交于 2019-12-02 00:52:49
Now although most modern browser support document.querySelectorAll() , you may run into problems with older versions of Internet Explorer. The obvious way of checking if the browser supports a function would be: if(document.querySelectorAll){ //some random code } But from what I understand some browsers like (IE8) don't support certain properties, like ' body * '. Is there a better way to check if document.querySelectorAll('body *') will actually work? document.querySelectorAll will thrown on any unsupported selector so you can simply use a try-catch block. test Browser support or not ,

Are cookies fit for just client side usage?

心已入冬 提交于 2019-12-02 00:25:40
问题 I want to store some non confidential data on the user's browser (or any device/mobile browser) for the next session. I can store that on the cookies but I dont want to send that cookie on any requests to server. I just need to store and retrieve about 5 key-value pairs, client side only. Is cookie a good fit for this purpose or should I consider local storage? Cross-browser support is very important. 回答1: localStorage is supported pretty well. AmplifyJS provides non-cookie fallbacks for

What are differences between Chrome on Android and Desktop Chrome?

自作多情 提交于 2019-12-02 00:13:45
I know both use the same webkit version (537.36) and both use the same javascript engine (V8), but are there any other major differences between them? I have a webapp with automated tests for desktop Chrome but nothing for Chrome on Android. I'm trying to decide if I know it works on desktop Chrome do I need to go through the trouble of testing it on Chrome on Android, or are they similar enough that I should have confidence it works on both. Thanks! Main difference is that Android don't have Flash because of the HTML5 implementation, and also there's a lot of different screen sizes and users

CSS: Dropdown option text color not working on Mac OS X

萝らか妹 提交于 2019-12-01 23:52:19
I want to set the color of the dropdown options text with value 1 to red. My HTML dropdown: <select name="ctl00$MainContent$TelephoneDD" id="MainContent_TelephoneDD" class="form-control"> <option value="">Select</option> <option value="1">33534543534</option> <option value="1">78678678678</option> <option value="0">99923444445</option> </select> CSS: #MainContent_TelephoneDD option[value="1"] { color: red; } This works in most of the browsers except in Chrome and Safari under Mac OS X. Q: How can I make the dropdown options text color to red if the option value is 1 to work in Chrome under Mac

XMLHttpRequest to read an external file

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 23:42:24
I want to retrieve the data contained in a text file (from a given URL) through JavaScript (running on the client's browser). So far, I've tried the following approach: var xmlhttp, text; xmlhttp = new XMLHttpRequest(); xmlhttp.open('GET', 'http://www.example.com/file.txt', false); xmlhttp.send(); text = xmlhttp.responseText; But it only works for Firefox. Does anyone have any suggestions to make this work in every browser? Thanks IT works using xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); in IE older versions. Chrome, Firefox and all sensible browsers use xhr Frankly, if you want cross

Cross browser @font-face use

岁酱吖の 提交于 2019-12-01 23:42:20
I've been having a lot of difficulties with using custom fonts and @font-face . I'm trying to get a font consistent across the latest versions of Chrome, Safari & Firefox (shown in that order in the screenshot below: I'm using the following to generate this: @font-face { font-family: 'dineng'; src: url('fonts/dineng.eot'); src: url('fonts/dineng.eot?#iefix') format('embedded-opentype'), url('fonts/dineng.woff') format('woff'), url('fonts/dineng.ttf') format('truetype'), url('fonts/dineng.svg#dineng') format('svg'); font-weight: normal; font-style: normal; } And: .menu-button a { height:25px;