BackGround Image Help!!!!

liunx

Guest
My problem is that I want to insert a image as my background and I want it to fit 100% to the size of the browser no matter wut size monitor it is on. Not the entire webpage top to bottom, but the current part of the site you are looking at. If any thinks they can help me with this problem pls tell me. Thanx<!--content-->i have asked about the same thing only suggestion to me was to make a different page for each size...i used the most common resolutions and resized the back ground to just under the actual resolution cause of your slide bar on the right plus the items at the top your visitors may have then if you dont want it to scroll with the page just put in the body tag bgproperties="fixed" and it will not move as the page is scrolled....now you will need a redirect page to send each person to the correct page for the resolution they are using and that would look something like this<br />
<html><br />
<br />
<head><!--Put the actual script between the head-tags--><br />
<script LANGUAGE="JavaScript"><br />
//submitted to A1 javaScripts by Micke (<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->)<br />
<!--<br />
function redirectPage() {<br />
var url640x480 = "page made for the 640x480.html";<br />
var url800x600 = "page made for the 800x600 res.";<br />
var url1024x768 = "page made for the 1024x786 res.";<br />
if ((screen.width == 640) && (screen.height == 480)) <br />
window.location.href= <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/url640x480;">http://www.htmlforums.com/archive/index.php/url640x480;</a><!-- m --><br />
else if ((screen.width == 800) && (screen.height == 600))<br />
window.location.href= <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/url800x600;">http://www.htmlforums.com/archive/index.php/url800x600;</a><!-- m --><br />
else if ((screen.width == 1024) && (screen.height == 768))<br />
window.location.href= <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/url1024x768;">http://www.htmlforums.com/archive/index ... l1024x768;</a><!-- m --><br />
else window.location.href= <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/url800x600;">http://www.htmlforums.com/archive/index.php/url800x600;</a><!-- m --><br />
}<br />
// --><br />
</script><br />
<br />
<title></title><br />
</head><br />
<!--Put the event onload in the body-tag--><br />
<br />
<body onload="redirectPage();"><br />
<br />
<p>&nbsp;</p><br />
</body><br />
</html><br />
that is pretty much the exact code i used minus the actual site locations<!--content-->Thanx for the help!! yeah this should do unless there is a more simpler way thanx again<!--content-->if the image is not as big as the users resolution then you can't. you would have to stretch the image and that would look awful. the code above is the best way.<!--content-->
 
Back
Top