Forum Moderators: open
How do you get firfox to display a background image/color to the bottom of the document and not the viewport?
I have an iframe. The document inside have a div with height: 100%, so does html and body. The background-color to this div is set to #dddddd. This div is filled with some text which makes the vertical scroll bar appear.
Now, everything works fine. The div is streteched to the bottom BUT when I scroll down the background color isnt displayed anymore! I can see the div is still going on because the text continues but the background color stops where the clipping was made!
Anyone? please.. =)
You don't want to restrict the height to 100% (of the viewport)... really that should be min-height (if IE6 supported it that would be great, but IE6 is OK with just the height as you've found) - FF and IE7 should be OK with this. Or you could set the background-color on the body element instead?
Ive tried using a background-image in the body(without setting any heights to 100%), but then it only goes as far as the content goes. It wont reach the bottom of the viewport.
Its in an iframe to be precise. I want 200 pixels at the left of the iframes content to be grey...
Say the iframe has a height of 500px. If the content withing is 100px high then the grey area should still be 500px high. If the content is 700px then the grey area should be 700px.
I guess the problem could be formulated as:
if(content.height > viewport.height){
grey.height = content.height;
}else{
grey.height = viewport.height;
}
Dang..
You think the problem would remain if I changed to object instead of iframe?
[edited by: encyclo at 4:28 pm (utc) on Nov. 18, 2006]
[edit reason] see sticky mail [/edit]