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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

my image is tiled? why??

Status
Not open for further replies.

lmarshall

MIS
Jun 11, 2002
108
US
I am using Dreamweaver MX. My image always shows up tiled if the screen area is more than 600x800 and it doesn't show the whole image if it is any less than that. I need it so that it will work with all screen areas. Is there any way to do that and why won't this code work?

Thanks!
lmarshall

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<style type=&quot;type/css&quot;>
body{
background-image: url(&quot;homeback.gif&quot;);
background-repeat: no-repeat;
background-position: center center;
background-attachment: fixed;
}
</style>
</head>

<body background=&quot;homeback.gif&quot;>



</body>
</html>
 
Use this: <body background=&quot;homeback.gif&quot; bgproperties=fixed>
I have not failed; I merely found 100,000 different ways of not succeding...
 
<html>
<head>
<title>following wullie advice</title>
<script language=&quot;javascript&quot; type=&quot;text/javascript&quot;>
<!--
function chosebg() {
if (document.getElementsByTagName) {
if (screen.width > 1024) {
body[0].style.backgroundImage = 'url(more_than_1024x768.jpg)';
body = document.getElementsByTagName(&quot;body&quot;);
} elseif (screen.width == 1024) {
body[0].style.backgroundImage = 'url(1024x768.jpg)';
} elseif (screen.width == 800) {
body[0].style.backgroundImage = 'url(800x600.jpg)';
} else {
body[0].style.backgroundImage = 'url(640x480_and_less.jpg)';
}
} else {
alert('your browser is scrap so i can't fit the background image for u');
}
}
//-->
</script>
</head>
<body background=&quot;default.jpg&quot; onload=&quot;chosebg()&quot;></body>
</html> ---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
You can use a DW extension called &quot;Background that Fit&quot; not sure if you can get it at the Macromedia site or will have to do a search on google. It enables your background image to resize depending on the visitors resolution of their browser, so your background will always fit.

I think you can get the extension at
Hope thats of some help to you, Regards

Naiku
 
Yes it is possible to do this!
I have seen it somewhere but don't remember where?

What I remember is the following syntax:

<body background=&quot;homeback.gif&quot; bgproperties=notile>

or may be some boolean property for tiling the image.

Atleast I may assure you that it is possible. Momin ho to bay taigh bhee lerta hay sipahee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top