Svitlana
Svitlana

Reputation: 2374

Chrome dev-tools, who is setting the height/width?

I found that I am helpless - when I need to find who is responsible for setting elements property values. It usually takes a while to pin point the problem.

Can anybody share the best strategy if you come to the page - see that computed height is "500px", but no body set it explicitly - yes, I eventually find the reason but I would like to be a bit more methodical.

Thank you

Upvotes: 20

Views: 5782

Answers (1)

Kas Elvirov
Kas Elvirov

Reputation: 7980

For Google Chrome browser

  • right click on element and select Inspect element
  • expand Computed tab and look for offending style
  • find property that you need and click small triangle to the left of style definition. On click it should expand list of selectors that affects this style for this element

Read more

enter image description here

Upvotes: 9

Related Questions