Wenn Du es mit Javascript machen willst, kannst Du so vorgehen.
Code:
<script language="javascript">
document.write("<style type="text/css">");
if(screen.width < 800) {
document.write("body {background-image:640.gif;}
}
if(screen.width >= 800 && screen.width < 1024) {
document.write("body {background-image:800.gif;}
}
if(screen.width > 1024) {
document.write("body {background-image:1024.gif;}
}
document.write("</style>");
</script>
Hoffe mal es sind keine Bugs drin, habs jetzt nur aus dem Kopf getippt