Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable view of rulers in Chrome DevTools?

Chrome DevTools previously offered a setting to show rulers when inspecting elements. It had a pixel ruler at the sides of the view, and boundary lines for each element extending the full view of the page.

It used to be found (as I recall) in "DevTools Settings / General". There no longer is a General section, and I don't see it in "DevTools Settings / Appearance". Has this been moved, or removed? I'm not finding documentation or discussion of it.

like image 780
2540625 Avatar asked Jan 28 '18 20:01

2540625


People also ask

How do I add the ruler to inspect element?

To bring up the Ruler, right-click on the page where you would like to use a ruler and click “Inspect Element”. Next, you need to enable it for the first time, click on the 3 vertical dots in the top-right and Settings. A new window will open, under the Elements section select Show Ruler option.

How do I show gridlines in Chrome?

Mac Cmd + Shift + C or Windows: Ctrl + Shift + C . Now we can use the Elements inspector where we can see all the elements in there you will see the [grid] block behind grid elements; this was the existing feature. This little toggle will show us the grid overview, but that is about it.

How do I use the grid ruler in Chrome?

#How to use: - drag from main vertical/horizontal ruler to create grids. - click on intersection of vertical ruler and horizontal ruler to go into ruler mode. - while in ruler mode, hold <Shift> key to get a straight line.

How do I hide the ruler in Chrome?

Right-click anywhere on the screen, "Inspect Element", gear-wheel in the lower left (Windows) or in the lower right (Mac), "General" tab, scroll down at the bottom "Show Rulers". Check it on/off to liking.


2 Answers

You can enable it in DevTools Settings > Preferences, under the Elements section.

Update: Most of them might be confused on how to use it. To use, open console and hover on an element to view the ruler. Thanks @Brandito for mentioning in the comment.

Show rulers

like image 108
Gideon Pyzer Avatar answered Sep 20 '22 14:09

Gideon Pyzer


  1. Click Toggle Device Toolbar Toggle Device Toolbar which is in the top-left of your DevTools window.

  2. Click More Options and then select Show rulers.

    Show rulers

    The rulers are to the left of and above your viewport. You can click on the numbers to set the width and height to that size.

    Rulers

like image 27
Kayce Basques Avatar answered Sep 16 '22 14:09

Kayce Basques