Firefox doesn't play nice with margin-bottom
Hi all,
I'm developing a site and I've been testing it on IE6, IE7 beta3 and FireFox 1.5.0.4 (latest version).
One of the things I wanted to do was set the margin-bottom to extend the length of a couple divs. This works great in all versions of IE greater than 4.x. Unfortunately when I try this in FireFox, it not only ignores the property (which I could handle), but it doesn't render the background image for the div at all anymore. Does anyone know what's up with this? Or better yet, have an alternative solution? I suppose I could grab the screen resolution and calculate a fixed length, but I'm not that picky with this app.
Thanks in advance,
Jeff G.
Re: Firefox doesn't play nice with margin-bottom
Add marginwidth and marginheight to the body styles. Fortunately Firefox has a JavaScript console. Check in there as to why the margin is ignored.
Re: Firefox doesn't play nice with margin-bottom
Hi all,
The properties marginwidth and marginheight don't exist. What I ended up doing was using the properties
.somedivclass {
background-image : url(images/someimage.gif);
background-repeat : repeat-y;
padding-bottom:100cm;
}
This does what I want it to in both Firefox and IE7.
Thanks,
Jeff
Re: Firefox doesn't play nice with margin-bottom
Quote:
Originally Posted by gitter1226
The properties marginwidth and marginheight don't exist.
Well, they do for the <body> tag which is what I though you were working with.
My guess is that it has something to do with the tag since a <div> tag's display is inline. You can try setting the display to block. I don't know if it will work though.
Code:
.somedivclass {
background-image : url(images/someimage.gif);
background-repeat : repeat-y;
padding-bottom:100cm;
display: block;
}
Re: Firefox doesn't play nice with margin-bottom
Ah, I see. Sorry I wasn't more clear. Thanks for the help.
Re: Firefox doesn't play nice with margin-bottom
Did that solve your problem?
Re: Firefox doesn't play nice with margin-bottom
Actually, no. I used what I posted earlier. I didn't need to use the display:block; property. We were just talking in circles around each other, lol.
Thanks again.