austiniskoge 0 Report post Posted June 16, 2006 (edited) I'm just starting to design my website. So far, it looks okay. Here's a basic rundown: index.html is divided into two frames: menubar.htm (25%) and "mainwindow" (75%). The menu bar has about 7 images which, when clicked, open other .htm files in "mainwindow". I want a background image "tsmg2.jpg" (which is in the same folder as everything else) to be behind the 7 link- images. The image works, I know- I can code <img src="tsmg2.jpg"> and it will display it. However, I want it as the background. I've been coding <background="tsmg2.jpg"> and putting that right under the first <html> opening tag. Why doesn't it show "tsmg" as the background for the other images? -EDIT- okay, I found a css tutorial off google. now, I need to know how to have only one image (not tiled) I tried: <style type="text/css"> body { background-image: url('tsmg2.jpg') background-repeat: no-repeat; } </style> with no luck... and can I have the browser auto-size it to fit the frame? I know different browsers display different looks... Edited June 16, 2006 by austiniskoge (see edit history) Share this post Link to post Share on other sites
Houdini 0 Report post Posted June 16, 2006 (edited) That belongs in the body tag <html><head><title>My New Site</title></head><body backgound="tsmg2.jpg"><!--all your other stuff you want-->Your content here</body></html> Edited June 16, 2006 by Houdini (see edit history) Share this post Link to post Share on other sites
austiniskoge 0 Report post Posted June 16, 2006 Okay. That works to place the image in the frame.But what about not tiling it?It's a small image, so after the first one displays at the top of the frame, it continues with more all the way down.Isn't it like:<body background="tsmg2.jpg" position="center">except that's like horizontal center, and I just want one vertically centered image. Share this post Link to post Share on other sites
Houdini 0 Report post Posted June 16, 2006 You would need to use CSS like body{background-image: url(tsmg2.jpg); repeat:no-repeat; background-attachment:fixed} You might want to enlarge the image or it might work if you tried body {background-image:url(tsmg2.jpg); background-position:100% 100%} Share this post Link to post Share on other sites
mpinsky 0 Report post Posted June 16, 2006 I had this very same problem as I have the exact same basic frame setup as you described except that my background is to the left, but while your background may remain un-tiled, if your text exceeds the length of your picture, the picture will also go up with the text as well instead of remaining fixed.In my honest opinion, something like that usually looks nicer if the background remains fixed while only the text and body images scroll (but that just might be me). :(So, here's what I did for mine (I changed it so it would fit yours): <style type="text/css">body{background:url(tsmg2.jpg) fixed no-repeat center}</style> Hope that made sense... Share this post Link to post Share on other sites