I’ve been toying with the idea of adding another graphic to my main page. The problem is that adding a graphic for 800x600 resolution will make the area in question very “crunched”. So I thought I would play with custom content based on browser size.
Unfortunately PHP, being server based, does not allow custom content, so the alternative is Javascript.
<SCRIPT language="JavaScript">
<!--
if (screen.width>=1024)
{
document.write('All the HTML goes in here');
}
//-->
</SCRIPT>
There are some issues:
-
If javascript is turned off, the user will not see this content.
-
If the user has some sort of privacy software installed so it doesn’t pass info to the browser, the user will not see this content.
In other words, don’t use critical content in this way.
I opted to add the new Weather Underground advisory information on the main page using this method.
At 1024x768 (or greater):
At 800x600 (or lesser):