Hello, I´ve got a lil problem with my site. I tried to make it compatible with any resolution, also with 800x600. But I don´t want the background-image, which I have on higher resolutions, in 800x600. I want to completely remove the bg image in 800x600. Is that possible? Thanks
I know there's a way to do it using php, but I'm not sure about regular html. Do a little poking around and I'm sure something will come up.
Javascript can detect screen resolution. So here's what you need to do. Use java to get screen resolution, store in a variable. Now again using java run an IF command and DOCUMENT.WRITE the body tag ------------ <script language="javascript"> var myname=screen.width; if (myname > 800) { document.write("<body background='backimage.gif'>"); } else { document.write("<body>"); } </script> Change the name of the image to the one you are using. "backimage.gif" Then replace your "<body>" tag with this code. bye
You can also try seting the bkgnd image dinamically, and only for high resolutions... <script language="javascript"> var myname=screen.width; if (myname > 800) { document.body.background='http://www.yourdomain.com/theimg.jpg'; } else { document.body.background=''; } </script> This way you don't need to change anything, just add this code somewhere in the page.