cross-browser

How many nested tags in HTML can you have before it crashes a browser?

♀尐吖头ヾ 提交于 2019-12-12 04:28:58
问题 I had a thought earlier today regarding nested HTML tags and how browsers render them: <html xmlns="http://www.w3.org/1999/xhtml" {or whichever html version} xml:lang="en" lang="en"> <head> </head> <body> let n = 1 <div> recurse div n times until maximum (browser fails) </div> </body> </html> what will n be when the browser cannot handle any more recursion? I would think this would be different for each browser, and different also for mobile apps. Is there a web standard, such as the maximum

if not “my operating system” change css - jquery

感情迁移 提交于 2019-12-12 03:44:29
问题 I'm trying to make a ' css hack ' that will allow me to change css depending on a user's OS. For Mac and iOS I want one style, for everything else (Windows, Linux, Android, etc...) I want a different style. So far I've cobbled together this: if (navigator.platform = :not("MacIntel")) { $("p").css("font-size", "50px"); } But, I'm not sure how to take it further. What I want to do is say: if not Mac or iOS, then change the css font size element. Any idea how i can do this? I've made a jsFiddle

CSS/HTML compatibility issues across the same browser

好久不见. 提交于 2019-12-12 03:35:47
问题 Good Day. I have a rather weird problem. And it is the first time I came across this. I have an html/css menu (navigation menu) consisting of a ul list and anchor tags inside. I am using border-bottom to highlight the menu on hover... Now issue: I have 2 PC's on which I work - Both windows 7, different editions. Now in chrome and firefox, the menu shows fine. Also, I am using an IE only stylesheet to fix an alignment issue in IE. Look at Image1 to see my menu in the above mentioned browsers..

How to avoid a th element from inheriting properties from a tr element in IE6/7

痴心易碎 提交于 2019-12-12 03:24:44
问题 I've got a table which has a repeating background image on the header: thead tr { border-collapse:collapse; background: #D3D2D2 url(images/background-table-header.gif) repeat-x top; } And this works across in both Firefox and Internet explorer, but if we want certain column headers to show the sorting direction we decorate the th with the class Sorted and the Direction. And use css to to add a direction icon. thead th.Sorted { background-repeat: no-repeat; background-position: center left;

How can I create a cross-browser pure CSS flip animation?

≯℡__Kan透↙ 提交于 2019-12-12 03:18:30
问题 So I've created a CSS flip animation. My problem is, that it looks totally different in latest browsers of Chrome, FF, and IE. How should I modify the css, to work perfectly in these modern browsers? Thanks! Here is the working example: jsfiddle 来源: https://stackoverflow.com/questions/26465632/how-can-i-create-a-cross-browser-pure-css-flip-animation

.remove() not working in Internet Explorer [duplicate]

对着背影说爱祢 提交于 2019-12-12 03:18:05
问题 This question already has answers here : Remove element by id (17 answers) Closed 4 years ago . This code works very well in Google Chrome, but wont work in Internet Explorer: document.getElementsByClassName('info')[i].remove(); Is there some other method to do the same thing or can I make .remove() work in Internet Explorer? 回答1: remove is not supported by ie You would have to get the parent and call removeChild var node = document.getElementsByClassName('info')[i]; node.parentNode

How to force Chrome (or any other WebKit browser) not to use “default” tag names?

女生的网名这么多〃 提交于 2019-12-12 02:55:42
问题 I was having issues because of Chrome automatically referencing DIV... It works that way in Safari (desktop and mobile), but not in Firefox. See image: See Fiddle (open in Chrome, then in Firefox): http://jsfiddle.net/stefek99/Sqcff/ The question is - how to disable this feature ? I would really like to develop in "strict" mode without any Google quirks, just to make sure my code is cross-browser compliant. 回答1: This is a known 'problem', however I have not been able to find a reliable method

HTML5 CSS3 modal window, close when click outside

好久不见. 提交于 2019-12-12 02:52:40
问题 I use the modal window as described by Keenan Payne, made with HTML5 & CSS3. I would like it to close when the user clicks on the darkened background, outside the modal window. Does anybody knows how to do this? Modal window by Keenan Payne: http://www.webdesignerdepot.com/2012/10/creating-a-modal-window-with-html5-and-css3/ 回答1: You have to change the target on something different than #openModal. You can import jQuery, put this in <head> section: <script src="http://ajax.googleapis.com/ajax

IE issue with styling <select/> element

两盒软妹~` 提交于 2019-12-12 02:48:54
问题 Consider the following HTML markup: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>search/master</title> <style type="text/css"> select{ background-color: pink; } option{ background-color: white; } </style> </head> <body> <p> <select> <option>one........</option> <option>two........</option> </select> </p> </body> </html> Output on FF

Problems with image upload from browsers to Amazon S3

让人想犯罪 __ 提交于 2019-12-12 02:28:04
问题 Recently I have implemented image upload to Amazon S3 from javascript in browser. I have focused to FireFox, Chrome and IE only. At the end I have not managed to implement it for IE - any version(even 10). The use case was something like this: select a local image file send file size, mime content type and file name to a server in cloud. make base64 thumbnail out of image file server in cloud do the signing and sends me all important data and url for upload Get the data and form xhr