| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| New Member | CSS: having multiple fixed background positions in a body tag? Hi, I want a background to stay as I scroll down and I currently have this: body { background-image: url(image.gif); background-repeat: no-repeat; background-attachment: fixed; } But how do I add multiple images in a body tag? Thnx in advance |
| |
| | #2 (permalink) |
| Eating Pie | I am not quiet sure what you are getting to multiply images in the body tag? But I think you mean how do I add multiply bg images.. Well so far there is no code for that so it is impossible to accomplish.. There may be a way using CSS. iNod
__________________ I feel old. |
| |
| | #3 (permalink) |
| DNOA Member | Just combine the images into one using an image editor :-/
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #6 (permalink) |
| DNOA Member | Use <div> tags! Make one a background image with no repeat, then make the other one a <div style="background-image: url('image.php');"> thing ... just make sure you somehow attach it to the corner and make it behind text. How exactly? I don't know. www.pixel2life.com might have some tuts on how to do that.
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #8 (permalink) |
| DNOA Member | No, I've seen somebody do it before! It's possible! It was a firefox icon in the top-right corner of the screen that stayed there even when you scrolled... and it was clickable... can't remember the site though! (Yes, it was a background image too)
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #9 (permalink) | ||
| New Member | Quote:
![]() Quote:
| ||
| |
| | #10 (permalink) |
| DNOA Member | It's been done, like I said - use a <div> tag. It's possible... GRRR I can't find that site
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #12 (permalink) |
| DNOA Member | http://www.echoecho.com/csslayers.htm and http://www.southerntwilight.com/tuto...csslayers.html may both be helpful. Be sure that your div tag has this: <div class="bg"> (or whatever name for it) Then your class: .bg { background-image: url('image.jpg'); z-index: 1; position: relative; top: 0px; left: 100%; } Now, I'm not sure about the left: 100% thing, but you want to make sure that the REST of your site is in a <div> or <span> tag that has a z-index of 2 OR HIGHER! Otherwise that corner will be on TOP of the text instead of BELOW it! Also, if it doesn't stay there when scrolling, try changing "relative" to "absolute".
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #13 (permalink) |
| NamePros Regular | you could use mutliple div tags or span but I don't they might be helpful but I would like to agree with Yumball combining would be better else irragation and it would also be easy if you wanted to edit it again
__________________ Live Support : Zubair11 [at] hotmail.com Free SEO Directory! || Free Games and Songs || eBloggy.net Zubair.info || Mixcat Interactive |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fixed background image in IE | John_P | Programming | 1 | 06-07-2005 07:52 PM |
| In dreamweaver, how do you make your Css Style have an image background | John_Smith198 | Web Design Discussion | 3 | 06-05-2005 05:04 AM |
| CSS Redefine body? | elixium | CODE | 3 | 07-05-2004 01:42 AM |
| Fixed Backgrounds CSS IE/Moz | Spirited | Programming | 3 | 06-08-2004 08:07 PM |
| pb with background (css) | virgile00 | Graphic Design / Flash | 1 | 11-06-2003 08:41 AM |