Let's say I have the code:
var $element = $('<div/>');
$element.css("margin-left", "2cm");
console.log($element.css("margin-left"));
Chrome gives me nothing, and Firefox gives me "75.5833px". Any ideas about how to fix/work around this? I understand that the div not in the DOM can have difficulties in retrieving what the browser interprets to be computable units, such as percentages and all... Basically what it boils down to is that I want apply styles, including shorthand styles like font, background and margin, and retrieve the styles that they can be broken into in as efficient a way as possible.