Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS auto horizontal margin with a bottom margin

Tags:

css

margin

I have a div with a margin: 0 auto; and that part works great. I also want to give this div a bottom margin of 80px. I've tried margin: 0 auto 80px; and that work fine in webkit browsers, but not in FF. Anyone know how to achieve this for all browsers?

like image 265
Tony Beninate Avatar asked Nov 28 '25 16:11

Tony Beninate


1 Answers

What you said (0 auto 80px) should work, regardless of browser unless too old. I've done it many times myself without error. I think something else is going on here, I know it sounds silly but maybe some other selector you're not aware of? this happens a lot more than one would guess.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!