[css-d] Funky Margins with FF 1.5?
Hello, I'm in the process of redoing my personal webpage in order to gear up for the big job search in the Spring, and I'm having an unusual issue that I've never encountered before. My styles work in IE but not in FF or Safari. Weird. If someone could check it out for me, and see what the mystery is, I'd really appreciate it. http://www.id.iit.edu/~colbath http://www.id.iit.edu/~colbath/include/styles.css Thanks, -=gc=- __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Funky Margins with FF 1.5?
On 11/22/05, Ann Adamcik [EMAIL PROTECTED] wrote: I've run into this before, but haven't figured out why it happens. For some reason, setting a top margin on the first element of a div (your #flag h1 in this case) pushes the div's background image down. Try padding instead. If anyone has an explanation, I'm curious... -Ann Backgrounds go from border to border. Margin is outside of border, padding is inside of border. -- -- Christian Montoya christianmontoya.com ... rdpdesign.com ... cssliquid.com __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Funky Margins with FF 1.5?
Geoffrey Alan Colbath wrote: http://www.id.iit.edu/~colbath My styles work in IE but not in FF or Safari. Weird. Not really... :-) It's just a bunch of good browsers following standards about collapsing margins[1]. IE isn't good, and doesn't follow standard - especially not when it's given a couple of 'hasLayout'[2] triggers. The cure: set a top padding on container, and adjust its height accordingly... #flag {padding: 1px 0 0 0; height: 99px;} ...and it will come out as you intended across browser-land. regards Georg [1]http://www.w3.org/TR/CSS21/box.html#collapsing-margins [2]http://www.satzansatz.de/cssd/onhavinglayout.html -- http://www.gunlaug.no __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/