Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"adjustable" Background Image

Status
Not open for further replies.

kiefmer

MIS
May 19, 2000
66
US
Is there anyway that I can use an image for a background that will adjust to the size of the viewer's screen? And I don't want it to tile. I have my monitor set at 1280x1024 and I know that "normal" viewers don't have theirs set that high. Does anyone have any ideas? I sure hope so! [smile]

Thanks,
Heath
 
what do u mean by "image that will adjust to screen size"?
images are in Fixed size and HTML shound not be used to force their smaller larger size as u will slow peages loads or loose on reslution.
you can:
- adjust the position of the image
- detect user's screen reslution and redirect to the page that uses the larger image (look into JavaScript (code pannel--Snips--JavaScript--Browesers))
somewhere in line of:
Code:
<script>
<!--
function sizeRedirect()
{
  var wide = window.screen.width;
    
  if(wide = 800) URLStr = "1.html";
  else URLStr = "2.html";
  location = URLStr;
}
//-->
</script>
</head>
<body onLoad="sizeRedirect();">

HTH
All the best!

> need more info?
:: don't click HERE ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top