This is the best answer I could come up with, I finally found it by chance on a very useful site.
function adjustStyle(width) {
width = parseInt(width);
if (width < 701) {
$("#size-stylesheet").attr("href", "css/narrow.css");
} else if ((width >= 701) && (width < 900)) {
$("#size-stylesheet").attr("href", "css/medium.css");
} else {
$("#size-stylesheet").attr("href", "css/wide.css");
}
}
$(function() {
adjustStyle($(this).width());
$(window).resize(function() {
adjustStyle($(this).width());
});
});
Website: http://css-tricks.com/6206-resolution-specific-stylesheets/
jQuery changes the css browser on the fly, so if you change the size of your browser, css will change. It also works in all browsers.
source
share