August 17, 2012

Debugging in Firebug

Question by frazzle

Wonder if anyone can give some advice.

Bascially this is something I come across from time to time – I’m learning to debug using firebug and trying to track down where a style attribute is being set in a complex bunch of wordpress/fancy box files.

Bascially I’m trying to get fancybox to autosize to width of element, I know the fancybox option to enable this, but the whole box seems to be overriding with a fixed width, which i can’t find anywhere in the stylesheets.

element.style {
border-width:10px;
height:84px;
width:987px;

Now, this doesn’t have a style sheet associated on the right hand side in firebug, so I’m assuming this means its computed on the fly somewhere in the js/php ?

What I’m after is a pointer on how to track down where it’s being set, and how I can maybe use firebug to identify that if it’s being set outside the stylesheets? it’s so I can be a better debugger too 🙂 thanks for looking.

Answer by Starx

  1. First locate the element
  2. Once you do this, trigger the event, you will see the change
...

Please fill the form - I will response as fast as I can!