In a large div there are 2 row (div), and in the large div to add a background image. However, after the change, in Firefox but can not correctly display the background picture. The code is like this:
1.HTML (sample):
Copy Code code as follows:
<div id= "Footer" >
<div id= "Footer_left" >Content1</div>
<div id= "Footer_right" >Content2</div>
</div>
2. CSS:
Copy Code code as follows:
#footer {
width:730px;
Background-image:url (.. /images/bg.jpg);
background-repeat:repeat-y;
}
#footer_left {
Float:left;
width:230px;
}
#footer_right {
Float:left;
width:500px;
}
This code is left and right two columns of typesetting, using the parent div (footer) background picture as a child div (footer_left) background, to reach the left and the two columns height alignment.
Solution:
This is because your #footer_left and #footer_right add Float:left, and if the elements in FF add Float:left (right), it will not be stretched, that is to say, its height is 0, if the normal display, Must add: Overflow:auto,
That
Copy Code code as follows:
#footer {
width:730px;
Background-image:url (.. /images/bg.jpg);
Background-repeat:repeat-y;
Overflow:auto;
}