AggieDave 6 #1 December 10, 2004 I want to set a background image so it doesn't scroll, etc, but I want it to stretch/shrink to the window size. For some reason I can't figure it out (I'm feeling webdesign stupid right now). Do I need to set it as a table background and create a giant window for the frame, I don't think that would work, though. Damnit, this is why only doing webdesign every once in a while and only for friend's businesses fucks with you, you forget too much stuff between sites...HA the last site I did was Single-Helix and that was nearly a year ago...or was it a year ago...it was a long time ago.--"When I die, may I be surrounded by scattered chrome and burning gasoline." Quote Share this post Link to post Share on other sites
AggieDave 6 #2 December 10, 2004 Wait...maybe it was a XML trick I used to use for this. DAMNIT I can't remember...--"When I die, may I be surrounded by scattered chrome and burning gasoline." Quote Share this post Link to post Share on other sites
champu 1 #3 December 10, 2004 you can't do that with a stylesheet. all you can do with a stylesheet is anchor it (background-attachment: fixed) position it (background-position: top right) and set how it repeats (background-repeat: repeat-y, repeat-x, etc) I imagine you want a stretched background image that just takes up the whole window and never moves while the rest of the page goes about its business? to do that I'd probably make a div tag position=absolute with an image inside of it with height=100% width=100% and resize the div tag using javascript when you changed the window size. kinda old school, but you should end up with something cross-browser compatible edited to add: css background properties Quote Share this post Link to post Share on other sites
AggieDave 6 #4 December 10, 2004 Yeah, that was my thought as well...After I posted I actually took a couple seconds to think about it (smoked a cigerette) and then I felt like an idiot for even thinking it could be done with CSS. I'm really rusty with the web design, but its coming back really quickly thank god. Atleast I still remember how to use Action Script in Flash so the "hard" part is already done. Atleast when I get this site done I'll have the money to buy Morgan's Christmas present.--"When I die, may I be surrounded by scattered chrome and burning gasoline." Quote Share this post Link to post Share on other sites
AggieDave 6 #5 December 10, 2004 Ha! Got a fun workaround, keeping everything simple, browser load low and easy scripting (since I'm just creating the site, I'm giving it over to the owner to fill with content...he needs simple). Basically I created a nest of frames to force the browser to show a certain size. No matter how big you make the browser, the website stays a certain size. Although if you don't like frames, you'd HATE this. This is an old trick I used a good number of years ago for another site, I had just completely forgot about it. Oldie but a goodie, and very simple, which is best.Atleast in the time I spent going away from that aspect to figure it out later, I created a pretty smooth flash menu.--"When I die, may I be surrounded by scattered chrome and burning gasoline." Quote Share this post Link to post Share on other sites
Slurp56 0 #6 December 10, 2004 Cant you accomplish the same thing with a table? I'd rather use a fixed table than a frame. As a question, do you really want the image to stretch to all screen resolutions? I browse at 1600x1200 on this monitor and I believe it would either look quite pixelated or else the image size would be huge for viewers at 800x600. If you've got a linky, it might help me to understand extacly what you're trying to accomplish.________________________________________ I have proof-read this post 500 times, but I guarantee you'll still manage to find a flaw. Quote Share this post Link to post Share on other sites
AggieDave 6 #7 December 10, 2004 Well, with XML you can stretch and shrink with very very very little change in quality to the pic (within reason), but decided to go without that. I just set the viewing size to 1024x768 and went with that. With old 8x6 it'll still look ok, but not quite 100% right. I decided not to go with tables since a couple browsers out there really fuck up table rendering. They all pretty much get frames right, though. No link, sorry bro, client's wishes. First time I've had a client tell me specifically not to put it up until its ok'ed. Usually I'll put it up on some obscure corner of the web and have friends look at it for advice/praise/tomato throwing, but no dice this time. *shrug* Whatever, I don't care as long as I get paid. This was actually a fun site to build, its been a LONG time since I had fun building a site...and thus its been a while that I've actually said yes to a request to build a site for someone, needing money for Xmas presents will do that to ya, ya know?--"When I die, may I be surrounded by scattered chrome and burning gasoline." Quote Share this post Link to post Share on other sites