Does such an add-on exist for Firefox?
views:
62answers:
5
+3
A:
And you will have to do some simple arithmetics, if you mix borders/margins/paddings.
Xavier Ho
2010-06-22 11:35:18
I think this does not exactly do what the OP wants. Padding is not equal to the distance to the parent element.
Pekka
2010-06-22 12:12:29
As Pekka has said, Firebug does not have this feature.
Bytecode Ninja
2010-06-22 12:21:48
Well, you're welcome to ignore my answer. But you can always measure and find out what it is with the tools available in Firebug. Nonetheless, I edited my answer to explicitly state the necessary calculation if you need to.
Xavier Ho
2010-06-22 13:48:25
Well I unvoted your answer but it's just not the answer to my question. Of course I can calculate the distance myself but as I've said in the question I want a tool that displays these distances so that I don't have to calculate them myself.
Bytecode Ninja
2010-06-22 14:28:18
It seems most other answers are offering the same thing. I'm curious as Pekka, too. What do you need it for?
Xavier Ho
2010-06-22 14:30:20
A:
Firebug can tell you this information: enable it, choose the HTML tab, choose the element you're interested in, then select the layout tab on the right. It shows a diagram quite similar to your artwork above :-)
psmears
2010-06-22 11:35:30
Similar, yes, but not equal. As far as I can see, Firebug can't tell the distance of the right hand and bottom sides to the parent borders.
Pekka
2010-06-22 12:13:05
It can't. Don't confuse padding/margin/border with the distance between an element's boundaries (e.g. its border) to the boundaries of its parent.
Bytecode Ninja
2010-06-22 12:22:42
@Bytecode Ninja: in many, many cases they will be the same (or at least, this will give the information required) - think `<span>` inside `<td>` inside `<tr>` inside `<tbody>` inside `<table>`: often only one of these will have nonzero padding/margins. It wasn't clear from your question whether this would be enough or not - you might want to update your question, given the number of people who have interpreted it similarly :-) (You might also want to clarify whether you want to take into account borders, padding, margins of the inside/outside elements!)
psmears
2010-06-22 12:40:06
+1
A:
the best addon I can think of is CSSViewer, there is also firebug or web developer toolbar.
you can see more addons in this top 50 list
krike
2010-06-22 11:36:43
Thanks for sharing the link but none of the items listed there do what I am looking for.
Bytecode Ninja
2010-06-22 12:25:03
yes there is, nr 2 in that list is Firebug and that will do what you are looking for. look at the screenshot Xavier Ho made.
krike
2010-06-22 12:37:42