| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| New Member Join Date: Aug 2005
Posts: 18
![]() | 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 Join Date: Nov 2004 Location: Canada
Posts: 2,272
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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. |
| |
| | #6 (permalink) |
| DNOA Member Join Date: May 2004
Posts: 5,040
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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. |
| |
| | #8 (permalink) |
| DNOA Member Join Date: May 2004
Posts: 5,040
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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) |
| |
| | THREAD STARTER #9 (permalink) | ||||||||
| New Member Join Date: Aug 2005
Posts: 18
![]() |
![]()
| ||||||||
| |
| | #12 (permalink) |
| DNOA Member Join Date: May 2004
Posts: 5,040
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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: ????: NamePros.com http://www.namepros.com/showthread.php?t=114707 <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". |
| |
| | #13 (permalink) |
| NamePros Regular Join Date: Mar 2005
Posts: 912
![]() ![]() ![]() ![]() ![]() | 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 Online TV || Tech Blog Web Design & Web Development Services || Reliable Web Hosting |
| |
![]() |
| 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 08:52 PM |
| In dreamweaver, how do you make your Css Style have an image background | John_Smith198 | Web Design Discussion | 3 | 06-05-2005 06:04 AM |
| CSS Redefine body? | elixium | CODE | 3 | 07-05-2004 02:42 AM |
| Fixed Backgrounds CSS IE/Moz | Spirited | Programming | 3 | 06-08-2004 09:07 PM |
| pb with background (css) | virgile00 | Graphic Design / Flash | 1 | 11-06-2003 09:41 AM |