cross-browser

IE9 and Position Fixed

拥有回忆 提交于 2019-12-02 04:18:33
I'm trying to use the position fixed css on a simple one page website with vertical scrolling but am facing problems with IE9, it's like it's ignoring the fixed property, you can see the website here http://cairocubicles.com/sandbox/mahaly-iphone/ looks right on chrome, firefox. Appreciate the help. Yehia Try adding a doctype to make sure IE9 isn't going into quirks. This took me a while to figure out. I was writing some javascript using which contained code to write to console.log. Never noticed it was a problem as i never use IE and nothing appeared to be broken in FF or chrome. I had the js

Class Name not getting changed in IE 7, 8 and chrome

跟風遠走 提交于 2019-12-02 04:14:16
I am trying to change class name of two elements during onload. Here is my code for the same : var browserName=navigator.appName; var tfElem = document.getElementById("TTlExpct"); var blTfElem = document.getElementById("BTLExpct"); if (browserName=="Microsoft Internet Explorer") { tfElem.className ="pn-tf"; blTfElem.className ="pn-tf active"; } else { tfElem.setAttribute('class', 'pn-tf'); blTfElem.setAttribute('class', 'pn-tf active'); } The else block takes care of the code if its not IE, in mozilla, this is working fine, class name is getting set. Its not working in IE7 and IE8 and in

How is it possible to use aural style sheets on elements?

北城以北 提交于 2019-12-02 04:13:14
Just searched the Net and came up with the following codes..When I run them on Firefox4 and Safari, I don't seem to hear anything..How can I fix this? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> @media aural { h1, h2, h3, h4, h5, h6 { voice-family: paul, male; stress: 20; richness: 90 } h1 { pitch: x-low; pitch-range: 90 } h2 { pitch: x-low;

IE support for attribute selectors with HTML5 doctype

天大地大妈咪最大 提交于 2019-12-02 04:11:29
w3school's chapter on attribute selectors states that: IE7 and IE8 support attribute selectors only if a !DOCTYPE is specified. IE7 and IE8 don't recognize the HTML5 doctype, right? So, does this mean that IE7 and IE8 won't recognize my attribute selectors if I use the HTML5 doctype? Your attribute selectors will still work. Although IE7 and IE8 don't understand that the HTML5 doctype means the document is HTML5, it by itself is still a doctype declaration, and they understand the syntax in general, so they will still render your page in standards mode. As long as you have some kind of doctype

safari cookie issue

早过忘川 提交于 2019-12-02 04:08:53
I am pulling my hair out on this. It works on chrome and Firefox but not in safari. What am I doing wrong? I am setting up a temp cookie and then check if it is set or not. When I clear all the cookies from safari, and then I run this file, it thinks that cookie is still there. here is the code setcookie("testcookie", 'cookiesetting temporary'); if(isset($_COOKIE['testcookie'])){ echo "cookie set": }else{ echo "no cookie set"; } In safari only, after disabling the cookies and removing all the cookies , when I run the code above, it still echoes cookie set. Just to make sure, I also looked in

regular expression gives different output in FF and IE

我是研究僧i 提交于 2019-12-02 03:03:13
My problem is that when I use this code: var queuediv = document.getElementById('MSO_ContentTable'); var total = get_text(queuediv); countTotal = total.split(/\s+/).length; this is the function function get_text(el) { ret = ""; var length = el.childNodes.length; for (var i = 0; i < length; i++) { var node = el.childNodes[i]; if (node.nodeType != 8) { ret += node.nodeType != 1 ? node.nodeValue : get_text(node); } } return ret; } it gives me different values in IE and other browser gives same value. So is there a problem with my regexp? Thanks. You are splitting by white space characters (line

CSS Multi Line ellipsis Cross Browser

拥有回忆 提交于 2019-12-02 02:21:07
There is a "div" in my webpage that has fixed width and height. Following css only works with single line text: overflow: hidden; text-overflow: ellipsis; white-space: nowrap; How can I apply ellipsis on multiline text on the text inside that div using pure css with cross browser compatibility? Try this example: display: block; /* Fallback for non-webkit */ display: -webkit-box; max-width: 400px; height: $font-size*$line-height*$lines-to-show; /* Fallback for non-webkit */ margin: 0 auto; font-size: $font-size; line-height: $line-height; -webkit-line-clamp: $lines-to-show; -webkit-box-orient:

Load and display multiple animated gifs at the same time (synchronised) with Javascript

爷,独闯天下 提交于 2019-12-02 02:18:23
问题 I'm by no means any kind of coder or programmer, but I've been trying to load and display some gifs so that they all animate from the beginning at the same time. In other words, I need them to be synchronised. I've done a lot of Googling and what I've come up with seems to work with Chrome/Safari and Firefox, but as usual, Internet Explorer refuses to cooperate. My current code is this: var images = ["thephoto1", "thephoto2", "thephoto3", "thephoto4", "thephoto5"]; function initImages() { for

jQuery/Javascript: scrollTop Value in all browsers?

瘦欲@ 提交于 2019-12-02 01:58:47
maybe a few others already asked that but I couldn't find any answer to the problem … $(window).scroll(function() { // Only works in Firefox and I guess in Opera console.log(document.documentElement.scrollTop); // Only works in Chrome and Safari console.log(document.body.scrollTop); }); I need this scrollTop value to be correct in every browser! What's the way to that? Thank's in advance Use jQuery method scrolTop() it will work in all the browsers. $(document).scrollTop() 来源: https://stackoverflow.com/questions/9231601/jquery-javascript-scrolltop-value-in-all-browsers

Is it possible to create a CSS-only accordion?

筅森魡賤 提交于 2019-12-02 01:52:49
问题 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+). 回答1: Some CSS only Accordin here http://www.webdeveloperjuice.com/2010/05/17/8-powerful-pure-css-accordions-to-make-web-application-lite