Conditional stylesheet (browser width) (1 post)

  1. Guil
    Posted 5 years ago #

    Hey there,

    I've just been searching around for hours on end, looking for a solution for this.
    I've created my own theme, however it would look horrible on any monitor that isn't widescreen; I want to be able to load a different stylesheet (style-narrow.css, for example. As opposed to style.css) depending on the width of the browser window.

    This is easily achievable with a 'normal' website with jQuery - however through WordPress I am at a loss.
    I understand that using functions.php along with wp_enqueue_style is the way to go - but I have failed for hours on end, so now I come to you :)

    Any input would be greatly appreciated, thanks.

    Edit: perhaps this should be in the 'hacks' subforum, or elsewhere. My apologies.


Topic Closed

This topic has been closed to new replies.

About this Topic