I’m busy writing a small snippet of code that should allow cross-browser usage of the border-box box model. So far the basic functionality works fine, but I can’t get the margin to work. It should adapt to the space that’s available, but console returns a NaN and I have no idea where it comes from.
Here is a fiddle.
The console.log doesn’t even log anything and I don’t know why. Any help is greatly appreciated.
In many parts of your fiddle you have this pattern:
You’re trying to erase the
pxafter executing a multiplication which results in a syntax error. It should be eitherWhich works through auto type conversion or
Which parses the string as an integer, removing the trailing
px:Fiddle
parseIntreference