calibre *flattens* all css, that means that every CSS rule in the source document (including implicit rules) are converted to class based rules. This is done for excellent reasons, that I have explained many times before, a bit of googling should find you the explanation.
As for your issue, I dont have time to look at it right now, but from your description it sounds like you need to turn off the option to "Remove fake margins" under structure detection in the conversion dialog.
|