PDA

View Full Version : complex background thing


whatsupyous
08-16-2002, 05:16 PM
ok, heres a good question. how do you make an image stretch across multiple frames? and also, how do you make the background image so that it doesnt scroll down with the text? is that possible? please help!!!!

SpongeBobby
08-16-2002, 05:31 PM
I am not an expert at this, but my opinion, which is probably the hardest. Cut the background into the size of each frame and stick like left side in left frame, etc.

As for the background not moving. I did that once. No clue how i did it. Maybe it was b/c mine was an embeded watermark...not sure. might wanna try that.

code:

<body background="imagehere" bgproperties=fixed>

I think that is why my bg never scrolled down. i had some pics put on it and the words went over the pics, looked pretty cool.


Anyways...thats what *i* think

Roy Sinclair
08-16-2002, 08:19 PM
Each frame will contain it's own unique document and nothing can span from one frame to another. If you must have a background behind the whole page you cannot use frames. If you require frame then you cannot have a unified background, those two things are mutually exclusive.

brothercake
08-16-2002, 09:19 PM
Originally posted by Roy Sinclair
If you require frame then you cannot have a unified background, those two things are mutually exclusive.


Almost ... but not quite. You could use SpongeBobby's idea for cutting the image into correct-sized pieces that make the page appear to have a unified background - with that you would encounter browser-compatibility problems because frame dimensions are not consitent, but you could overcome that with javascript ... mostly, but not with 100% certainty.


But I agree with the essential point, that the two things you want are conceptually incompatible. I would advise you abandon your frames. Check out http://www.htmlhelp.com/faq/html/frames.html#frame-problems for info on the problems with framesets, and some alternative methods for the common uses for frames

skorn
08-16-2002, 10:04 PM
here it is whatsupyous

<style type="text/css">
<!--
body {
background-attachment: fixed;
background-image: url(image_name.gif);
background-repeat: no-repeat;
background-position: center center;
}
-->
</style>

paste than in between your <head></head>

some explanations:
1. background-attachment: fixed; - it means it will fix the bg
2. background-image: url(image_name.gif); - location and image name
3. background-repeat: no-repeat; - u know it means, do not repeat the bg image
4. background-position: center center; - where to position it. the first center for left-right positioning (other valid value: left, right). the second center for top-bottom (other valid value: top, bottom)

hope this really helps u dude.

love, sex, compute

whatsupyous
08-19-2002, 11:16 PM
thanks guys. im glad you guys gave me so many possibilities to work with.:thumbsup:

dk01
08-20-2002, 07:26 AM
Have I been fooled then when I thought I saw navigation bars spanning multiple frames?
-dk

Roy Sinclair
08-20-2002, 02:20 PM
Originally posted by dk01
Have I been fooled then when I thought I saw navigation bars spanning multiple frames?
-dk

A script in one frame can create (and hide or destroy) menu elements in another frame but they still cannot be placed over the frame boundary itself. That's what I suspect you've seen.

brothercake
08-20-2002, 02:55 PM
like http://www.brothercake.com/dropdown/split_frame.html

whatsupyous
08-23-2002, 11:20 PM
ok, i still cant get my background to do what i want. i want the background to not move, but if i scroll, i want it to stay with the text.....hmmmm, is there a way to make a background just stay in the area of the frame? like if i have a box for a frame, can i make a background the size of the box, but when i scroll down, the background stay there and the text move down?

SpongeBobby
08-24-2002, 08:48 AM
Your wanting it to sit there, then when you scroll the bg not move? then make it fixed. To ME i'm not getting a clear want from you...you made it sound like you wanted it to move, then didn't, then did. How about showing us on a page with no frames, then we can help you with the frame part, b/c i'm not getting a clear question.....sorry :(

If you scroll up to my reply, right below your first post, you will see how to make the bg stay and the text move only.

whatsupyous
08-26-2002, 10:56 PM
sorry about that last one spongebobby, i fixed it on my own. didnt mean to confuse you like that

duniyadnd
08-27-2002, 07:41 PM
The following site uses the system you want. Pretty effective too, and nice layout (at least it was, until they started revamping the information)

http://www.ajaxmania.nl/index_eng.html

Duniyadnd

whatsupyous
08-27-2002, 11:02 PM
thnk you for the reference, but i think i got somethin i can do....im gonna go with a table. i think itll be easier for me to mess with. but thank you for the reference site.

Mr J
08-29-2002, 03:18 PM
To have an image as the background you add

background=" " to the opening <body> tag

<body background="Your Image.jpg">

To have the background image fixed add

"BGPROPERTIES=FIXED" to the opening <BODY> tag.


<body background="Your Image.jpg" BGPROPERTIES="FIXED">