| | |
How to fix an image outside the <body> tag?
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
it would be more helpful for me and anyone else who may have some helpful ideas, and thus for yourself; if you say what isn't working.
- did it crash your computer? (hopefully not)
- did it show up fine in the correct place initially, but not remain fixed with relation to scroll?
- or somewhere inbetween?
- did it crash your computer? (hopefully not)
- did it show up fine in the correct place initially, but not remain fixed with relation to scroll?
- or somewhere inbetween?
Plato forgot the nullahedron..
but, having a stab at it.
I guess the problem is as I mentioned:
The background position is fixed relative to the scroll within the div, but that div isn't ever going to scroll
Is there a reason you can't use the body tag for the background?
I would try using a fixed position div behind the main section of your page... It doesn't work in IE usually as I said, but there's workarounds, as I said:
http://www.cssplay.co.uk/layouts/fixed.html
I guess the problem is as I mentioned:
•
•
•
•
you may find that that div does start scrolling with the page as it has a fixed anchor point. I dunno though: there is definately a calculatable compensation for the background attachment, it's just a question of whether browsers chose to make it.
Is there a reason you can't use the body tag for the background?
I would try using a fixed position div behind the main section of your page... It doesn't work in IE usually as I said, but there's workarounds, as I said:
http://www.cssplay.co.uk/layouts/fixed.html
Plato forgot the nullahedron..
•
•
Join Date: Aug 2006
Posts: 20
Reputation:
Solved Threads: 0
You can set it as a background image for the HTML
[code] html{background-image:url(whatever);position:fixed;top:0,left:0;}
This would fix the image in the top left corner of the page BEHIND anything else on the page - this might be what you're looking for.
HTH
[code] html{background-image:url(whatever);position:fixed;top:0,left:0;}
This would fix the image in the top left corner of the page BEHIND anything else on the page - this might be what you're looking for.
HTH
Last edited by webecho; Jan 10th, 2007 at 7:30 pm. Reason: syntax error
![]() |
Similar Threads
- How to get the javascript objects in html body tag (JavaScript / DHTML / AJAX)
- Accessing JavaScript objects in the Body Tag (JSP)
- I Dont Know How To Change The Way My Site Looks! Can Someone Help Me?? (Site Layout and Usability)
Other Threads in the HTML and CSS Forum
- Previous Thread: safari bug
- Next Thread: Css help for a newbie -- HELP !!
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash font fonts form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 xml xsl






