The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript How to load CSS using javescript Re: How to load CSS using javescript


The issue here is that there are two CSS files targeted specifically for different environments, desktop & mobile.

Media queries could reduce this to a single CSS file but if the separate files are required then there is no reason that the ‘media query’ couldn’t be in the head of the page to load the css file appropriate to the screen/device width.

Something like: