CSS Tricks

Debugging unnecessary horizontal scroll

One of the easiest tricks to debug when the html element leaves its container and see an extra space with a horizontal scrol bar is as follows:

click on the plus icon under styles tab when you inspect element on the browser web page

Now add a border using the selector as * . This will apply border on all elements and you will be able to see which element is causing the issue.

* {
    border: 1px solid red;
}

Go ahead and give it a try.

1 thought on “CSS Tricks”

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: