Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Height of <body> in FF vs others

Status
Not open for further replies.

Foamcow

Programmer
Nov 14, 2002
6,092
GB
Hmmm. Take a look at this page in Firefox and, for example, IE.



It's just a simple demo page with an image applied to the background of the body. The image is set to bottom left with no repeat.

Now, I would expect the image to appear bottom left of the browser window - this is, as far as I can recall how it's always been. Indeed *most* browsers seem to follow this behaviour. I'm pretty sure Firefox used to aswell.
But now, you will see that Firefox makes the body element
the size of the containing elements (perhaps this is more logical).

Is it just me or is this a new thing with FF?

Actually, I noticed something amiss at the start of the year as my company site stopped displaying the background properly in FF. I'm trying to implement some other changes at the moment and this is becoming an issue for me!

Any ideas or workarounds?

Foamcow Heavy Industries - Web design and ranting
Buy Languedoc wines in the UK
 
Changing to an HTML doctype, moving the bg image to the HTML element, and adding a "fixed" keyword to the background declaration does much the same as adding the 100% height... But it also suffers from the same pitfalls (namely if your content exceeds 1 screen's worth, it all goes pear-shaped).

I seem to remember earlier versions of Fx (e.g. 1.0.x) behaving differently... maybe the 1.5.x versions are more compliant?

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Code:
html {
  min-height: 100%;
}
Works for my FF1.5 and shouldn't really disturb anything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top