Remove inline styling

How do i remove all inline styling to my style.css?(se example)

example: <div id="someid" class="x-section _mPS2id-t mPS2id-target mPS2id-target-first mPS2id-target-last" style="margin: 0px;padding: 45px 0px 0px; background-color: hsl(0, 0%, 100%);"><div class="x-container max width" style="margin: 0px auto;padding: 0px;"><div class="x-column x-sm x-1-1" style="padding: 0px;"><h1 id="someid" class="h-custom-headline cs-ta-center man h1"><span> <span id="Blue"></span>?</span></h1></div></div></div>

style=“margin: 0px auto;padding: 0px;”> is in all elements(since it is in (basically) all elements i want to move it all to a stylesheet)

Hi There,

Thanks for writing in! You can simply assign a unique CSS class to your element for example,


Then you can add the CSS rules in to your stylesheet.

margin: 0px auto;
padding: 0px;

If you don’t have a child theme yet, you can refer to our guide here (

Hope that helps.

so i have to go through every old cornerstone element to do this?

Hey @patuuu321,

You will need to inspect each element and copy their inline styles. Then, unset the settings of each element and assign a class so you will be able to target and style them with the inline styles you copied in your style.css. That would be a lot of work though so I’d recommend that you don’t do that.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.