Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

element.style in chrome element inspector?

When I inspect elements in Chrome, under my styles I have element.style {}, What does this refer to? It contains styles I am not including in my code source.

like image 933
Adib Aroui Avatar asked Mar 29 '13 20:03

Adib Aroui


People also ask

How do you check styles in inspect element?

First, hover over the element you want to copy. Then, right-click on it and choose the option “Inspect”. On the left side is the HTML DOM tree, and on the right side, the CSS styles of the selected element.

What is element style in dev tools?

element. style in DevTools refers to inline styles applied to that element. Inline style will take precedence over any style you apply via style sheet. That is why your declaration is being crossed out.


1 Answers

Those are inline styles.
They come from the style="" attribute or from Javascript code that sets element.style.someProperty.

like image 152
SLaks Avatar answered Sep 26 '22 04:09

SLaks