Posts

Showing posts with the label Cross Browser

Browsers' Default CSS For HTML Elements

Answer : It's different for each browser, so: Firefox (Gecko): https://dxr.mozilla.org/mozilla-central/source/layout/style/res/html.css. Or, browse to resource://gre-resources/ and look at html.css . Chrome/Safari (WebKit): http://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css Chrome (Blink): https://chromium.googlesource.com/chromium/blink/+/master/Source/core/css/html.css Internet Explorer (Trident) , older versions: http://web.archive.org/web/20170122223926/http://www.iecss.com/ You can also look at the HTML5 Boilerplate stylesheet, which "normalizes the display of a lot of stuff without being a reset in the traditional sense". It also fixes quite a few bugs/inconsistencies. It's also worth looking at: https://github.com/necolas/normalize.css/blob/master/normalize.css A GitHub repository of all W3C HTML spec and vendor default CSS stylesheets can be found here 1. Default Styles for Firefox 2. Default Styles for Internet Explorer ...

Close Current Tab

Answer : You can only close windows/tabs that you create yourself. That is, you cannot programmatically close a window/tab that the user creates. For example, if you create a window with window.open() you can close it with window.close() . As of Chrome 46, a simple onclick=window.close() does the trick. This only closes the tab, and not the entire browser, if multiple tabs are opened. You can use below JavaScript. window.open('','_self').close(); In a HTML you can use below code <a href="javascript:close_window();">close</a> I have tried this in Chrome 61 and IE11 it is working fine. But this is not working with Firefox 57. In Firefox we can only close, windows which opened using below command. window.open()

Architectures To Access Smart Card From A Generic Browser? Or: How To Bridge The Gap From Browser To PC/SC Stack?

Answer : The fact is that browsers can't talk to (cryptographic) smart cards for other purposes than establishing SSL. You shall need additional code, executed by the browser, to access smart cards. There are tens of custom and proprietary plugins (using all three options you mentioned) for various purposes (signing being the most popular, I guess) built because there is no standard or universally accepted way, at least in Europe and I 'm sure elsewhere as well. Creating, distributing and maintaining your own shall be a blast, because browsers release every month or so and every new release changes sanboxing ir UI tricks, so you may need to adjust your code quite often. And you probably would want to have GUI capabilities, at least for asking the permission of the user to access a card or some functionality on it. For creating a multiple-platform, multiple browser plugin, something like firebreath could be used. Personally, I don't believe that exposing PC/S...

Chrome (windows) Does Not Hide Scrollbar

Answer : maybe you can use something like that? body { margin:0; padding:0; overflow-y: hidden; } body:hover { overflow-y: scroll; } http://jsfiddle.net/4RSbp/165/ Scrollbar is hiding on your Mac because this is a system preference (System Preferences > General > Show scroll bars). And unfortunatelly there is no version of -ms-overflow-style for Firefox or Chrome. For anyone comming here, if you want to hide scrollbars in a cross-browser cross-system way and keeping the scrollability enabled without visual glitching of mouse over rendering; hiding them behind the limits of your container is a good approach. (Beware, this will be long) Let's say you have a scrollable container and you want to hide the vertical scrollbar (even the thin transparent one that moderns systems shows). its ID is #scrollable: <html> [...] <div id="scrollable">Some Y large content</div> [...] </html> To achieve what we want, #scrollable...