[SOLVED] Fixed Background Image?

This is a discussion on "[SOLVED] Fixed Background Image?" within the Web Page Design section. This forum, and the thread "[SOLVED] Fixed Background Image? are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Oct 7th, 2007, 12:50
Jack Franklin's Avatar
Moderator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,404
Blog Entries: 8
Thanks: 18
Thanked 14 Times in 14 Posts
[SOLVED] Fixed Background Image?

I know there is a way to make it so if I had a background image and then scroll down the page, the background image doesn't move. But I cannot remember how. Can anyone help?
Also - which browsers support it?
__________________
Jack Franklin - Webforumz Moderator
(x)HTML | CSS | PHP | MySQL | JQuery (Javascript)
Contact: My Blog | Twitter | Delicious
Want Lessons? PM me.
If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Oct 7th, 2007, 13:34
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Fixed Background Image?

Here you go!
Code: Select all
cssforfixedbackground {
      background: #FFFFFF url(your.jpg) no-repeat fixed 0px 0px;
    width: 785px;
I test in IE6 and above and FF, Safari. And I have not had problems..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Oct 7th, 2007, 13:55
Jack Franklin's Avatar
Moderator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,404
Blog Entries: 8
Thanks: 18
Thanked 14 Times in 14 Posts
Re: Fixed Background Image?

Thank you, that's just what I needed.
__________________
Jack Franklin - Webforumz Moderator
(x)HTML | CSS | PHP | MySQL | JQuery (Javascript)
Contact: My Blog | Twitter | Delicious
Want Lessons? PM me.
If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Oct 7th, 2007, 14:02
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Fixed Background Image?

You're welcome!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Oct 7th, 2007, 19:45
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: [SOLVED] Fixed Background Image?

Note that background-attachment: fixed is partially broken in IE6.

You're fine provided you only use it on the <body> element. So Linda's solution will work correctly for the vast majority of cases.

If you want to apply it to any other element, however, things get messy. Here's an example that fails in IE6.

You can fix this with nasty hacks. IE7 doesn't need these hacks.

Last edited by MikeHopley; Oct 7th, 2007 at 19:47.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Background image not showing Aso Web Page Design 1 Apr 22nd, 2008 15:54
[SOLVED] About "background-image: fixed;" Scrolling Issues doctypedeclaration Web Page Design 9 Apr 13th, 2008 18:54
[SOLVED] image background dab42pat Graphics and 3D 4 Jan 7th, 2008 03:50
[SOLVED] Background Image Help RZX Developer Web Page Design 4 Dec 12th, 2007 09:39
[SOLVED] div background image problem in ie Rincewind Web Page Design 7 Nov 30th, 2007 09:30


All times are GMT. The time now is 23:27.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42