Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Why margin settings in a contained section affect the containing section? Reply To: Why margin settings in a contained section affect the containing section?

#193141
spz1st
Participant

Thanks. I hadn’t read the further down. But I disagree with the author on that such behavior is often desirable. By default, the margins should be kept separate and a css type (say margin-collapse: collapse;) could be made available to collapse the margins if ever so desired (or just set the margin to 0 ). Though now you can have a border or padding to prevent margin collapse, it may not be desirable to have a border or padding no matter how thin it is (let alone that 1 pixel border might even destroy your overall layout as shown in my other examples). So again I propose to have a new css type (say margin-collapse: none;) to prevent the margin collapse.