• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Simple HTML question

IamDavid

Diamond Member
How do you make a image stretch to the size of your background like on windows desktop? Instead of it tiling I want the picture to take up the whole background.
 
With Win9X, WinME & Win2K:

--> Right-click on your desktop and select properties.
--> From display properties, select the tab for background.
--> Select an image from the list on the left side of the box or
--> Click browse to select an image from another directory on your drive.
--> Chose stretch from the options (center, tile, stretch)

Note: If the image I want to use for a background is a jpg I convert it to a bmp so that I don't have to enable active desktop.
 
i believe you are talking about on a web page and not on a desktop? well you cant just do it that simply. everyone uses a different resolution. youd have to have a script tell you how big the persons window is first before you can set the dimensions. if you want you could set the dimensions really huge and it would work for anyone but i dont think thats what youre looking for.
 
Did a quick test with Frontpage 2000 and this seems to work fine:

<img src=&quot;example.jpg&quot; width=&quot;100%&quot; height=&quot;100%&quot;>

This stretches the picture to the size of the window.
 
Can someone post a link to a page that has this feature. I just tried it on one of my pages and it just tiled the image, it didn't stretch it.

Thanks,

Jay
 
i think this only works on IE, not netscape. i think, i read about this a while back and never really used it.




dam()
 
Add that STYLE tag to your body tag and the background image will not
repeat.

<body STYLE=&quot;background-image: url('images/background.jpg');
background-repeat: no-repeat&quot;>



It doesn't work in netscape ....( it's css ...)



dam()
 
There is a way, but it's not nice by any chance. Create a significantly larger image (e.g. 800x600) and use it as a page background. To those on that resolution it will look like one gigantic image, however to those on higher resolutions it will be tiled. You can also prevent this from happening by using javascript during the loading process to serve up the proper page/image depending on the user's resolution.

But IMHO, background images are not good for pages that have a moderate amount of text in it... it's just too &quot;busy&quot;.
 
Use JavaScript find the size of the window, or force it to 800*600 then load a pre defined image.

And make it a PNG of low quality, for all the modem users 🙂
 
Back
Top