«   Previous tip Next tip   »

Chrome DevTools: Scroll elements into the viewport

Last updated: 26th July 2020
Scroll elements into the viewport

Introduction

If an element you're inspecting is out of view, bring it into the viewport:

  1. Right click on the DOM node from the elements panel
  2. Select Scroll into view

Also, you probably see this all the time but don't forget, when you hover over a DOM node, a small tooltip appears indicating the dimensions and position of the element in question.

Tooltip indicating element position

Being able to scroll an element into view is especially handy when the page is very long.

Extra

You can even do this through regular JavaScript code (outside of DevTools) using the scrollIntoView method.

«   Previous tip Next tip   »

Sign up to receive a developer tip, in the form of a gif, in your inbox each week