

However, Google hasn't forgotten those who are tab minimalists and hardly open tabs more than nine to ten. The element's padding is highlighted in the viewport.This news isn’t yet old that Google Chrome has recently added the “ search for tab” feature for users who used to spend a lot of time looking for a specific tab in a sea of them. In the Box Model diagram in the Styles tab, hover over padding. Right-click the Change My Margin! element below and select Inspect. Use the Box Model interactive diagram in the Styles tab to change the width, height, padding, margin, or border length of an element. Toggling the :hover pseudostate on an element # Change the dimensions of an element The background color changes like before, even though you're not actually hovering over the element.įigure 5. Right-click the Hover Over Me! text and select Inspect.Ĭheck the :hover checkbox. Hover over the Hover Over Me! text below. DevTools supports :active, :focus, :hover, :visited, and others. Use the Styles tab to permanently apply a CSS pseudostate to an element. cls section of the Styles tab # Add a pseudostate to a class The color_me class has been applied to the element via the. If the Add A Class To Me! element had any other classes applied to it, you'd also be able to toggle them from here.įigure 4. A checkbox appears below the Add new class text box, where you can toggle the class on and off. Type color_me in the Add new class text box and then press Enter. DevTools reveals a text box where you can add classes to the selected element. Right-click the Add A Class To Me! element below and select Inspect.Ĭlick. Use the Styles tab to see how an element looks when a CSS class is applied to or removed from an element. The background-color:honeydew declaration has been applied to the element via the element.style section of the Styles tab # Add a CSS class to an element In the DOM Tree you can see that an inline style declaration was applied to the element.įigure 3. Right-click the Add A Background Color To Me! text below and select Inspect.Ĭlick element.style near the top of the Styles tab.

Use the Styles tab when you want to change or add CSS declarations to an element. CSS classes being applied to the selected element, such as aloha, are displayed in the Styles tab # Add a CSS declaration to an element If you'd like to dock your DevTools window to the right of your viewport, like you see in Figure 1, see Change DevTools placement.įigure 2. The inspected element is highlighted blue in the DOM Tree
