I need to reorder some items on my page using JS or CSS. My project is written with ReactJS. Basically the structure is:
<div class="parent">
<form>
<div class="header"></div>
<button type="submit" class="B"></button>
</form>
<checkbox class="A"></checkbox>
</div>
So what I need to do is to change A position and move it between header and B elements.
Can't use flexbox because the items does not inherit the same parents. Can't use appendChild function to inject there because will have the same behavior as directly putting the A element before B.
To be more specific, this checkbox is affecting my validation because I use WithValidationRules in React so I need to put it outside this wrapper.
There are some other ways to move this element? I prefer using CSS.
Thank you!