CSS background-position not working in Mobile Safari (iPhone/iPad)

The iPhone/Webkit browser cannot center align background images when placed in the body tag. The only way around this is to remove the background image from your body tag and use an additional DIV as a wrapper. #wrapper { background-color: #000000; background-image: url(‘images/background_top.png’); background-repeat: no-repeat; background-position: center top; overflow: auto; } <html lang=”en”> <head> <title>Title</title> … Read more

iOS8 Safari after a pushState the :nth-child() selectors not works

Indeed nth-child doesn’t work on IOS8. Switching for nth-of-type did the trick for me. It’s well supported https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-of-type That said if you want to take no chance, you can detect IOS 8 as follow. function isIOS8() { if (“600.1.4” == $.browser.version || ~navigator.userAgent.indexOf(‘OS 8_’) ){ return true; } return false; } var i=0, $el = … Read more

Select size attribute size not working in Chrome/Safari?

This is a known bug in webkit browsers. The simplest way to get it to work just how you like it in Chrome and Safari would be to manually specify the styling the select itself. Here is a working jsFiddle. select { height: 36px; font-size: 14px; } <select size=”2″> <option value=”0″ selected=”selected”>Default</option> <option value=”1″>select 1</option> … Read more

Does webKit in iOS 11 (Beta) support WebRTC?

Update: WebRTC Support is coming in iOS14.3 (Beta) 🎉 Learn more here: https://webkit.org/blog/11353/mediarecorder-api/ From iOS11+ : WebRTC is partially supported in WKWebView, and fully supported in the Safari App browser. Explained: WebRTC has three main JavaScript APIs: MediaStream (aka getUserMedia) RTCPeerConnection RTCDataChannel For apps running inside Safari App, iOS11+, all WebRTC APIs are supported. That … Read more

Multiple select in Safari iOS 7

// hack for iPhone 7.0.3 multiselects bug if(navigator.userAgent.match(/iPhone/i)) { $(‘select[multiple]’).each(function(){ var select = $(this).on({ “focusout”: function(){ var values = select.val() || []; setTimeout(function(){ select.val(values.length ? values : [”]).change(); }, 1000); } }); var firstOption = ‘<option value=”” disabled=”disabled”‘; firstOption += (select.val() || []).length > 0 ? ” : ‘ selected=”selected”‘; firstOption += ‘>&laquo; Select ‘ … Read more

Google Font not working on Safari

Your CSS should not only contain font-family: ‘Source Sans Pro’, sans-serif; it should also have values for FONT-STYLE and FONT-WEIGHT: font-family: ‘Source Sans Pro’, sans-serif; font-weight: 900; font-style: italic; in case you use a font that contains those values like for example: https://fonts.googleapis.com/css?family=Source+Sans+Pro:900italic

Row Wrap in flex-box not wrapping in Safari

Per a comment on bugs.webkit.org, it seems the solution is simple! If your style is div.flex { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; -webkit-flex-direction: row; flex-direction: row; } div.flex .item { min-width: 15em; -webkit-flex: 1; flex: 1; } you just need to add more explicitness to your flex declaration. In fact, I think … Read more