Is there a way to preserve the original styling of an inline element without having additional CSS rules applied to it? I need to maintain consistency across multiple pages without making modifications to my existing CSS code.
<body class="processed" style="padding-top: 157px ;margin-top: 0px;">
Current CSS Override:
.processed{padding-top: 56px !important;}
JavaScript Solution:
$(function(){
var pad = $('body').css('padding-top');
$('body').attr('style','padding-top:'+ pad +' !important; margin-top: 0px;');
console.log('pad' + pad);
});
The outcome: body
with an inline style of 56px
, rather than 157px
as intended...