cross-browser

Remove default browser styles on form elements

依然范特西╮ 提交于 2019-12-06 07:39:58
Note: I've tried searching on google, but couldn't find what I was looking for. Browsers have some default styles they use for rendering form elements, which is different from browser to browser. Is there a way to reset all of the native browser styles for form elements like select, radios, checkbox etc, to make a consistent look across browsers? I've made a quick example: form elements http://grab.by/grabs/34db87ee1ad93e031cc72808feb2c8e7.png As can see the form elements are rendered slightly differently. What I would like, is some styles, that can reset them, to look alike, for IE, Firefox

Getting dimensions of background-image

喜欢而已 提交于 2019-12-06 07:29:57
I'm trying to get width and height of element's background-image. When you click on it, it should show it inside the element ("200 300" in this case). HTML: <div id='test'></div> CSS: #test { width: 100px; height: 100px; background-image: url(http://placehold.it/200x300); } JavaScript: $('#test').on('click', function () { $(this).text(getDimensions($(this))); }); var getDimensions = function(item) { var img = new Image(); //Create new image img.src = item.css('background-image').replace(/url\(|\)$/ig, ''); //Source = clicked element background-image return img.width + ' ' + img.height; /

HTML/CSS Fonts: Different browsers/OSs different results

风格不统一 提交于 2019-12-06 07:19:47
I've been working on my website and I'm using font squirrel to generate some web fonts for the website, but currently I've this differences: Google Chrome OSX Google Chrome Windows Firefox OSX Firefox Windows Internet Explorer Is there a way I can "hack" the fonts under windows so they will look more the ones under OSX? Thank you. Different systems render fonts differently. There is mostly nothing you can do about it. You can just live with it: check that on major systems (Windows, Mac, Linux, maybe some mobile systems too) the rendering is acceptance . They cannot and need not be the same.

IE Font-face issues & solutions we tried

耗尽温柔 提交于 2019-12-06 07:16:28
问题 I know this is a common problem, I tried pretty much every solution I could find, and I wondered if showing a little bit of code would be more useful. The issue I am trying to implement 4 font-faces for a client. The current files have been generated with font-squirrel. However, the fonts are not working at all for IE 7/8, and partially working for IE9. The cross-browser rendering of the font itself is not the problem here, I just want it to be displayed. What we've tried We spent (at the

How to port a Chrome extension to another Web Browsers [closed]

有些话、适合烂在心里 提交于 2019-12-06 06:47:53
Closed . This question needs to be more focused . It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed 2 years ago . I wanted to know the best way to bring a Chrome extension on another browser, use Crossbrowser , re-coding is not an option as its very large. the best way to port a chrome extension is to look into WebExtension: https://wiki.mozilla.org/WebExtensions https://developer.mozilla.org/en-US/Add-ons/WebExtensions Firefox already is on its way to support it: https://blog.mozilla.org

What trick will give most reliable/compatible sound alarm in a browser window for most browsers

核能气质少年 提交于 2019-12-06 06:32:43
I want to be able to play an alarm sound using Javascript in a browser window, preferably with the requirement for any browser plugins (Quicktime/Flash). I have been experimenting with the tag and the new Audio object in Javascript, but results are mixed: As you can see, there is no variant that works on all browsers. Do I miss a trick that is more cross-browser compatible? This is my code: // mp3 with Audio object var snd = new Audio("/sounds/beep.mp3");snd.play(); // wav with Audio object var snd = new Audio("/sounds/beep.wav");snd.play(); // mp3 with EMBED tag $("#alarmsound").empty()

howto hide outline on a form

天大地大妈咪最大 提交于 2019-12-06 06:24:31
问题 I have to design a form with an input inside it. I use background image on the input so it would look like a button. Every time somebody clicks it, it would send $POST, a behavior I want to achieve. But the problem is about the outline around the form. The outline shows when we click the form. It's minor, but it would be great to make the form (or input) lose the outline. I test it using Firefox 3.6 and flock. Both of them show the outline behavior that I want to avoid. <div id="hdrRight">

Opening a file system folder/directory from web browser

冷暖自知 提交于 2019-12-06 06:22:09
问题 I distribute my desktop application on flash drives to thousands of users on Windows, Mac, and Linux. I have a HTML starter page that has links to the documentation, install guide, release notes, etc. which are all on the flash drive. I would love for the user to just install directly from the browser, but that's exactly what anti-virus programs are trying to prevent (and rightly so). Instead of trying to launch the installer, it's enough to locate the installer and let the user take the last

how to use Calibri font in linux and mac

邮差的信 提交于 2019-12-06 06:15:00
My project have all its text in calibri my choice, its working perfect in Window o.s in all major browser, but when we try to deploy the same project on Linux or Mac the font style (font family,size)changes and take some other form, it looks weird. Its known that TTF(True Type Fonts) are made for all O.S. Till now, I got the copy paste method to copy the file of calibri from Windows to linux but its not worthful for me. I want it to be general not just for a particular system. There is absolutely no technical problem installing Calibri on Linux, either system-wide or per user (see fontconfig

How effective is the Chrome developer tools user-agent override at emulating other browsers?

核能气质少年 提交于 2019-12-06 06:03:01
问题 The Chrome developer tools have a feature to change the user-agent to spoof servers enabling developers to test applications for other devices and browsers without having to leave the comfort of the Chrome browser on a desktop terminal. I assume that Chrome emulates these other browsers rather than them virtually. How standards compliant is Chrome with regard to JavaScript, CSS, and other technical browser differences? For instance, has anyone done a comprehensive test to determine if the