iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-06-2007, 08:02 PM
WebProWorld New Member
 
Join Date: Oct 2004
Location: England
Posts: 24
wickywills RepRank 0
Default Background position bottom not working properly in firefox!

Hi all,

I appear to be having a problem with what should be a VERY simple website design.

I have a background image that i have positioned at the bottom of the page, and i want that background image to ALWAYS appear at the bottom of the page (not just at the bottom of the lowest bit of content). An example of what i'm trying to achieve can be seen here:

http://www.wickywills.com/3dstuff/0003.asp

If you open the above link in IE6 and Firefox, you should see the difference straight away. IE6 behaves exactly how i would expect (and how i want it to), however Firefox just aligns the background image to the bottom of the visible window, and if you scroll down on that page, you will scroll past the background image - which should not be possible!

Not sure how it looks in IE7 since i don't yet have it installed (XP Service Pack 2 seems to make my PC really unstable!), but would appreciate it if someone tried it out in that as well.

Is there anyone who can help me on the above?

I just want to get a background positioned correctly at the bottom - don't mind at all if I break W3C standards to do so!

cheers
James
Reply With Quote
  #2 (permalink)  
Old 01-06-2007, 09:30 PM
WebProWorld New Member
 
Join Date: Oct 2004
Location: England
Posts: 24
wickywills RepRank 0
Default

Just solved my own problem :)

Instead of putting the background image on the BODY and aligning it bottom, i decided to put it on a "Container" div and set that div's "min-height" to 100% (you'll also need to do the BODY, HTML{height:100%}) to get this to work.

hopefully this has helped someone! (let me know if it has ;)
__________________
My website - http://www.wickywills.com
Reply With Quote
  #3 (permalink)  
Old 10-20-2009, 09:52 PM
Doc's Avatar
Doc Doc is offline
WebProWorld Veteran
WebProWorld MVP
 
Join Date: Jun 2009
Location: Baja California
Posts: 689
Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9
Default Re: Another example...

Quote:
Originally Posted by TempUserNr2131124 View Post
Y-positioning with a "bottom"-value is a problem in Firefox. The solution is to first set height = "100%"! Example...

  1. <script type="text/javascript">
  2. //...For example you set the background in fram x to bottom-right...
  3. bFn = getElementsByAttribute(top.frames[x].document,"body","bgcolor")[0];
  4. bFn.style.margin = "0";
  5. bFn.style.padding = "0";
  6. bFn.style.width = "100%";
  7. bFn.style.height = "100%"; // <<< important
  8. bFn.style.backgroundRepeat = "no-repeat";
  9. bFn.style.backgroundPosition = "right bottom"; //x y
  10. </script>
You DO realize this is a nearly three year old thread, right?
__________________
If I ever stop learning, let the wolves have my carcass.
http://doccampbell.wordpress.com/
http://cleanstreamwaterconditioning.com
http://carforums-online.com
Reply With Quote
  #4 (permalink)  
Old 10-21-2009, 10:48 AM
DaveSawers's Avatar
WebProWorld Veteran
 
Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 492
DaveSawers RepRank 3DaveSawers RepRank 3
Default Re: Background position bottom not working properly in firefox!

With a user name like that one, it's probably just another attempt to get enough posts in to start spamming the forums with irrelevant links.
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote
  #5 (permalink)  
Old 10-21-2009, 11:10 AM
wige's Avatar
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,648
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default Re: Background position bottom not working properly in firefox!

Thats my guess...
__________________
The best way to learn anything, is to question everything.
Reply With Quote
  #6 (permalink)  
Old 10-21-2009, 12:20 PM
Doc's Avatar
Doc Doc is offline
WebProWorld Veteran
WebProWorld MVP
 
Join Date: Jun 2009
Location: Baja California
Posts: 689
Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9Doc RepRank 9
Default Re: Background position bottom not working properly in firefox!

It would seem that the username was more temporary than they realized!
__________________
If I ever stop learning, let the wolves have my carcass.
http://doccampbell.wordpress.com/
http://cleanstreamwaterconditioning.com
http://carforums-online.com
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

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



All times are GMT -4. The time now is 05:35 AM.



Search Engine Optimization by vBSEO 3.3.0