Resizing images and adjusting landing pages based on screen resolution

So many browsers so many different screen resolutions. Here’s a way to modify html code based on the screen resolution of the browser. In this example I have changed an image but there is no reason why you cant change text, font size or even use it to redirect users who have mobile sized screens.

if ((screen.width>=1280) && (screen.height>=720))
document.write("<img src=\"images/pic.png\" />");
document.write("<img src=\"images/picsmall.png\" />");

Remember to check your landing pages on all screen resolutions. Users with crappy displays still convert and if you’re landing page looks rubish on them you are losing ROI.

adjust screen resolution

You may also like...

Leave a Reply

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