I added this point to our FAQ<https://getfirebug.com/faq#Why_does_the_CSS_in_the_CSS_panel_look_different_to_the_one_in_my_file>, so people may get to know about that more easily.
Sebastian On Friday, June 21, 2013 9:27:38 AM UTC+2, Sebastian Zartner wrote: > > The CSS panel in Firebug just displays the CSS like it is interpreted by > Firefox. And Firefox interprets margin: 10px 0px 10px 0px; as margin: > 10px 0;. Also 0px is of course equal to 0em or simply 0. I.e. both > definitions have the same meaning. See the Mozilla documentation about > margin <https://developer.mozilla.org/en-US/docs/Web/CSS/margin> for more > info. > > Sebastian > > On Thursday, June 20, 2013 11:30:30 PM UTC+2, DrDave45 wrote: >> >> I have quite a few shorthand declarations for margins, padding, etc. >> When specifying all four, FireBug only reports the first two when the >> second is zero, e.g. .mymargin{margin:10px 0px 10px 0px;} >> >> This is true whether the second is 0 or 0px. >> >> <html> >>> <head> >>> <style type="text/css"> >>> .ItemWithPx{z-index:4320;margin:10px 0px 10px 0px;} >>> .ItemWOPx{z-index:4320;margin:10px 0 10px 0;} >>> .divRed{background-color:red;height:40px;width:100%;} >>> .divYellow{background-color:yellow;width:100%} >>> </style> >>> </head> >>> <body> >>> <div class="divred">The following has margin:10px 0px 10px 0px</div> >>> <div class="divyellow ItemWithPx">This is a menu item</div> >>> <div class="divred">The following has margin:10px 0 10px 0</div> >>> <div class="divyellow ItemWOPx">This is a menu item</div> >>> <div class="divred">Bottom div</div> >>> <br> >>> </body> >>> </html> >>> >>> >> From the CSS FierBug tab: >> >>> .ItemWithPx { >>> margin: 10px 0; >>> z-index: 4320; >>> } >>> .ItemWOPx { >>> margin: 10px 0; >>> z-index: 4320; >>> } >>> .divRed { >>> background-color: red; >>> height: 40px; >>> width: 100%; >>> } >>> .divYellow { >>> background-color: yellow; >>> width: 100%; >>> } >>> >> >> The "Q" webtools inspect element also only reports the first two. >> However, FireBug reports both 0px and 0 as "0", while the "Q" webtools >> inspect element reports both as "0px". >> >> The good news is that all four ARE processed in FireFox - I was worried >> that the browser was dropping some of my CSS rule properties, but it is >> only in the reporting. >> > -- You received this message because you are subscribed to the Google Groups "Firebug" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/firebug. To view this discussion on the web visit https://groups.google.com/d/msgid/firebug/a32745ab-67e4-46c4-be2e-baf10c7bee99%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
