Use Different Background Graphic Depending on Client's Screen Resolution
Posted on 2007-09-30
I want the HTML page to load one background graphic if the client's screen resolution is 800x600, but a different background graphic if the client's resolution is 1024x768 or higher. (Assume clients are using IE6.)
Click for your screen resolution</a>
But how can it be adapted to a function that runs automatically on window load or page load and writes a different graphic source into the <body> tag?
For example, if the resolution is 800x600, I want it to act like:
But if the resolution is 1024x768 or higher, it should act like: