|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Stretch a picture to fill up the whole background of a webpage?
Is there any code (preferably html) that would allow the background image of a webpage to fully take up the page no matter what resolution you view it at??
I have an image sized pretty good for the page size, but on some resolutions I see it is too small and it tiles the image. Is there any way to stretch the image (larger or smaller) to the actual html page size? I basically have a picture that is meant too look like a sheet of paper with an image at the bottom, and it tiles itself and starts the new "piece" of paper again. I want this page to look like it was written on the piece of paper image and have it be contained within the page. Any help would be greatly appreciated. Thanks in advance. |
|
#2
|
|||||
|
|||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
try <img src="image.png" width="100%" height="100%"></img>.
|
|
#3
|
|||||
|
|||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
That just puts the image at the top of the page.. arghh.. lol
Umm.. I have it set up originally as Code:
<body background="Image X.gif"> |
|
#4
|
|||||
|
|||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
try..... <body background="Image X.gif" width="100%" height="100%">
|
|
#5
|
|||||
|
|||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
Quote:
And I even tried closing it with an extra </body> tag too... |
|
#6
|
|||||
|
|||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
Ok, I found out how to do it..
I'll post it here for future reference in case anyone needs it. I had to use CSS Style sheets.. Code:
<style>
body {
background-color: #ffffff;
background-image: url("Image X");
background-repeat: no-repeat;
background-position: center top;
background-attachment: scroll }
</style>
|
|
#7
|
||||
|
||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
I think that only puts the picture in as the size of the image. I don't think you can stetch it out to fill the page. The image has to be the size of the screen. For example, try viewing the page in a different resolution.
|
|
#8
|
|||||
|
|||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
Quote:
ughh... Oh well.. I think I'll just add a "This website is best viewed at 1024X768" note to the pages.. Who surfs the web at 800X600 anyways? ![]() |
|
#9
|
|||||
|
|||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
Quote:
|
|
#10
|
||||
|
||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
Quote:
Are you trying to make the image static as the page scrolls? because I can show you how to do that. Anyway, if you link to the page, I'm sure something could be done. |
|
#11
|
|||||
|
|||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
Quote:
Notepad and text editor all the way. lol Quote:
As for a page link, If I ever get it up and running on a server like I was supposed to do last week, I will gladly link it and show you what I mean. Right now it is just in the development stages so far. (Not a team website either - personal one.) |
|
#12
|
||||
|
||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
This might take a lot of work, but I am sure you can do it using CSS to move the image (in an img tag) so that it is behind the page contents with a lower z-index. This doesn't sound like a great idea, but it might work. Then you can streth out the img tag to the width of the screen (100%). I might be missing something though.
|
|
#13
|
||||
|
||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
Quote:
|
|
#14
|
||||
|
||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
Maybe I was confused. I thought he wanted it as a background. If you just want the image to take up the whole screen then just put width="100%" in the img tag. No frames or tables required.
|
|
#15
|
|||||
|
|||||
|
Re: Stretch a picture to fill up the whole background of a webpage?
Quote:
Why not put the page in a table with a width equal to the width of the image? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|