Shaneo
06-10-2003, 10:11 AM
I did a serach for stretched backgrounds and i see someone posted this you could place you bg in a <div with style 100%width etc and
all you content floated above that in another <div or two.
currently there is no CSS property to stretch a background image.
Alternatively you might manage it with tables. but i don't get how i would go about doing it.. Can someone please help :( Plz don't suggest resizeing the background in an image prog cause i know how to do that. I would like to know what this person was trying to explain.. Thanks :D
Elentari
06-10-2003, 12:07 PM
I think they mean making a table that's 100% width and height (so it fills the whole page) and then putting a background in that.
Shaneo
06-10-2003, 12:33 PM
And the code for that is?
Elentari
06-10-2003, 09:16 PM
The code is easily found if you just do a search. http://www.lissaexplains.com/table.shtml
Shaneo
06-11-2003, 09:44 AM
:( That doesn't help! Someone please show me how then i can go about editing! :(
lefty
06-11-2003, 12:38 PM
Did you even look at the page?
http://www.lissaexplains.com/table.shtml#width
http://www.lissaexplains.com/table.shtml#background
<table background="image.jpg" height=100% width=100%>
[rest of table stuff here]
Shaneo
06-11-2003, 01:41 PM
Did you even try that out b4 posting it?
It doesn't work! It still tiles :rolleyes:
lefty
06-11-2003, 02:00 PM
d'oh, what was I thinking? My apologies. The width/height attribute has to be inside the image tag, not the table. ::smacks forehead::
Let's forget the whole table thing for a moment, shall we?
I would put all my information in divs - one would be the image code, the other would be the rest of the page. The image code would look something like this:
<div style="position:absolute; top:0px; left:0px; height:100%; width:100%; z-index:1;"><img src="image.jpg" height=100% width=100%></div>
Then the rest of your page content would go in a seperate div...
<div style="position:absolute; top:0px; left:0px; z-index:2;">
It doesn't matter what else goes in the div code, but you need to have the z-index in there so it goes on top of the image.
Sorry for my ignorance before. :lol: I'm sure there are other methods to this, too, but this is how I would do it. See if it works.
Shaneo
06-12-2003, 09:23 AM
Yay it works.. U a genieus lefty :p
but i do have one small lil prob.. When i put my HTML stuff/layout in the second div it's on the left of the page.. I would like it to center also without having to specify how far across i want it from the left.. Can u help me again plz :D Thanks Genieus :D!
Oh and one last thing i just found.. The background won't stick now.. Is there a way i can make the page move but not the background.. Like i would do with bgproperties="fixed" if i were doing it the other way..
lefty
06-12-2003, 02:41 PM
I don't know how you want it centered, but I played around with it and came out with this:
<div style="position:absolute; top:0px; left:0px; z-index:2; height:100%; width:100%;">
<center>[text and stuff here]
as for the background, I'm trying to think of a way it can stay put but nothing's coming to mind right now. :lol: