> There is no 'one-fix-it-all' solution. Overflow is one option; float, > display:table-cell or inline-block are 2 more options.
Hmmm, that's a shame. Should you be wondering why I'm bothering with all this, I've been looking for a good way to work with paddings and margins (trying to find some kind of logic instead of mixing the two depending on my mood). This is what I've come up with so far. http://www.onderhond.com/blog/work/margins-paddings-introduction http://www.onderhond.com/blog/work/margins-paddings-guidelines http://www.onderhond.com/blog/work/margins-paddings-solution1 http://www.onderhond.com/blog/work/margins-paddings-solution2 Sadly, the background clipping is a serious obstacle as it stands in the way of my favored (theoretical) solution. But thanks for the help :) Greets, Niels Matthijs http://www.onderhond.com/blog/onderhond -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Philippe Wittenbergh Sent: donderdag 13 maart 2008 10:18 To: CSS-D Subject: Re: [css-d] margins & background clipping On Mar 12, 2008, at 11:22 PM, Niels Matthijs wrote: > Adding a border on the parent this is an ugly trick because when > changing the background color you need to change the border color > too. Generally I avoid such methods in css. border-color:transparent ? (of course, iExploder v6 doesn't play with that…). >> Or: establishing a new block-formatting context > > That's the overflow trick I've been using, I just wonder if there's > a safe fix that will work seamlessly in all situation. I can add > overflow:hidden but then I can't position anything outside my parent > container anymore ... etc etc. There is no 'one-fix-it-all' solution. Overflow is one option; float, display:table-cell or inline-block are 2 more options. And yeah, IE makes things difficult, depending on the hasLayout status of the parent, the margins on the first-child/last-child come and go. :not(fun) things. Philippe --- Philippe Wittenbergh http://l-c-n.com/ ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ No virus found in this incoming message. Checked by AVG. Version: 7.5.518 / Virus Database: 269.21.7/1327 - Release Date: 12/03/2008 13:27 No virus found in this outgoing message. Checked by AVG. Version: 7.5.518 / Virus Database: 269.21.7/1327 - Release Date: 12/03/2008 13:27 ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
