In my experience, CSS layout issues often fall out of one of the following categories:
- Overflow of content from its parent resulting in extra or unexpected scrollbars and content being pushed out of the regular viewport area.
- Inheriting browser inconsistencies leading to mixed results across browsers and devices.
- Unexpected inheritance from the cascade where multiple styles override one another, which may cause alignment and spacing issues, among other things.
- CSS resiliency failures from DOM changes, including when child elements have gained wrapping divs or additional elements are unexpectedly added.
We’ll review debugging for each category by learning common culprits for these issues and see how to use dev tools and other methods to pinpoint the offending styles. Of course, we’ll discuss possible resolutions to these bugs as well.