Viewing the box model
With the Select Element button pressed, if you hover over an element in the page, the box model for the element is shown overlaid on the page:
{{EmbedYouTube("vDRzN-svJHQ")}}
It's also shown overlaid if you hover over an element's markup in the HTML pane:
{{EmbedYouTube("xA4IxTttNLk")}}
From Firefox 39, if the element is inline and is split over multiple line boxes, the highlighter shows each individual line box that together make up the element:
The Box Model view
When an element's selected, you can get a detailed look at the box model in the Box Model view:
Starting in Firefox 40, if you hover over a value, you'll see a tooltip telling you which rule the value comes from:
Starting in Firefox 41, if you hover over part of the box model in the Box Model view, the corresponding part of the page is highlighted:
{{EmbedYouTube("DgyXdB4MCLY")}}
Editing the box model
Editing values in Box Model view
You can also edit the values in the Box Model view, and see the results immediately in the page:
{{EmbedYouTube("jij8IXYzpcA")}}
Editing box model in content
Starting in Firefox 48, it is possible to move absolutely positioned elements inline. That means, if an element has its {{cssxref("position")}}
property set to absolute
, relative
or fixed
and one or more of the {{cssxref("top")}}, {{cssxref("bottom")}} , {{cssxref("left")}} or {{cssxref("right")}} properties, a button is shown besides the positioning value. Clicking that button enables inline editing of the element within the page.
The element's position can be changed by dragging the handles on the edges. If the element is absolutely positioned, dashed lines are shown representing the offset parent. For relatively positioned elements the dashed lines indicate the original position of the node. The offsets are indicated by a line and a tooltip for each side.
{{EmbedYouTube("xZhKZKl_gCY")}}