Div Detection Class

One thing that is helpful when address browser and OS compatibility issues is to determine which browser and OS you are using. Thankfully if you’re using the Div Library plugin then you can take advantage of the DIV_Detection class included to populate the browser and OS within the <body> tag of your HTML. Simple add the following to your header.php

<?php if(class_exists('DIV_Detection')) $detection = new DIV_Detection(); ?>

This will instantiate the class allowing it to construct the HTTP_USER_AGENT details in the body class which can then be used to make CSS adjustments specifically to that browser and/or OS combination. Try it out for yourself its a great addition to have in your arsenal.

Leave a Reply

Your email address will not be published.