MAC and Safari Different CSS

  • July 31, 2022
  • 0
Hire Vivek Asodariya

Your site is turned out great for Windows and android programs however some time site isn’t dealing with MAC and SAFARI programs.

Macintosh and SAFARI program isn’t upheld numerous CSS that is the reason the site result will seem unique.

Many individuals give more significance to the site running great in Windows. Furthermore, those sites don’t play well in Mac and Safari. It has numerous design-related issues.

Many individuals esteem the way that their site functions admirably on Windows, Mac, and Safari. In every one of the three programs, the site needs somewhat more consideration regarding run well. All in the program, assuming the site runs well, many individuals visit the site.

For MAC and SAFARI, the CSS isn’t giving any media screen or whatever else.

To settle the design issue in MAC and SAFARI, I have found the arrangement and it will turn out exceptionally great.

I have applied on many locales. Since my clients are giving greater need to chip away at every one of the programs.

You can add the below code in the child theme’s header or functions.php file. If you don’t have a child theme then you can add the below code in the snippet plugin.

function vivek_patel_js_for_mac() {
?>
jQuery(document).ready(function( $ ){
var isMac = navigator.platform.toUpperCase().indexOf(‘MAC’)>=0;
var isMacLike = navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i)?true:false;
var isIOS = navigator.platform.match(/(iPhone|iPod|iPad)/i)?true:false;
if(isMac || isMacLike || isIOS)
{
jQuery(“body”).addClass(“custom_mac”);
}
});
<?php
}

add_action(‘wp_head’, ‘vivek_patel_js_for_mac’);


If you want to add the above code in the child theme’s header file then you want to add only javascript code. The hook and function are not working on the header file. It’s working only functions.php file.

On MAC, SAFARI, AND IOS devices, this class(custom_mac) will add on your website’s body using the above code.

For MAC, SAFARI, AND IOS devices only, You can change any CSS using this class(custom_mac).

Leave a Reply

Your email address will not be published. Required fields are marked *