|
-
July 15th, 2006, 03:18 PM
#1
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.
-
July 15th, 2006, 04:56 PM
#2
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.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
July 16th, 2006, 11:07 PM
#3
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
-
July 17th, 2006, 09:03 AM
#4
Re: Firefox doesn't play nice with margin-bottom
 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;
}
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
July 17th, 2006, 11:44 AM
#5
Re: Firefox doesn't play nice with margin-bottom
Ah, I see. Sorry I wasn't more clear. Thanks for the help.
-
July 17th, 2006, 07:00 PM
#6
Re: Firefox doesn't play nice with margin-bottom
Did that solve your problem?
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
July 18th, 2006, 01:17 PM
#7
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|