0

When loading a page I work on, I see something like this:

14:54:44.103 Error in parsing value for ‘margin’.  Declaration dropped. instantiate_obj.php

(With a yellow-ish triangle with an exclamationmark in front of it)

The warning is clear: somewhere in the html/css a faulty margin-value is used.

But how to find out where, or what causes it?

Is it something inline, an external CSS, something dynamically added by javascript?

What I tried:

  1. Clicking on the link on "instantiate_obj.php" just opens a tab in "view-source:" mode.

Not very useful. I don't see any problems on quick inspection, but the page is pretty big. I want something easier than checking everything in the source and the linked CSS.

  1. Looking at the timestamp (14:54:44.103) I see it ends in 103. Maybe a linenumber?

Nope, that particular line contains only <br>.

  1. Searching https://developer.mozilla.org didn't shed any light on how to approach this problem.

I can only find out references on how to do it when you see the yellow-ish triangle in inspector, in the second pane (css with that 'filter styles' on top)

Does anybody know how to find out what caused the warning?

Erwin Moller
  • 2,375
  • 14
  • 22
  • it can be anything, a typo, a style elsewhere overwriting it (so another value is applied), ... You may use the validator to help yourself to find out if there is any typo : https://jigsaw.w3.org/css-validator/ – G-Cyrillus Jun 28 '23 at 14:00
  • @G-Cyrillus Thank you for responding, but that is not my question. I know it can be anything, hence my question. :-) I already put the external stylesheet into css-validator, but it came out OKAY. But there is also inline CSS and javascript doing things. If I make a javascript error, Firefox tells me WHERE it happened. I wonder how to do that with CSS warnings. – Erwin Moller Jun 28 '23 at 14:02

0 Answers0