Resizing images and adjusting landing pages based on screen resolution

0
295

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.

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

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here