My approach to beginning a new design always involves overriding the default padding and margin set by the browser on all elements:
* { margin: 0; padding: 0; }
After coming across j08691's response regarding a margin collapse issue, I discovered that setting overflow: auto
resolved more issues than anticipated. This made me wonder if it would be beneficial to include overflow: auto
for all elements within the html
(the scroll bar should not go missing). Therefore, I added:
html * { overflow: auto; }
I implemented this rule in one of our websites, and initially, it seemed to work fine. However, I have concerns that it may cause compatibility issues with less common elements (which are not currently being used but could be in the future) as well as ... Internet Explorer.
Has anyone experimented with a default overflow: auto
? Is it considered problematic? Would it be wiser to apply a more targeted version by defining a default overflow: auto
solely for div
elements?