html - Responsive design css dom element manipulation -
i have div field including input element , label element. both display: block
<div class="cf-full"> <input id="a" > <label class="helptext"</label> </div>
so in normal view, input field come first. however, want layout responsive, in mobile label come first.
i know dom manipulation can achieved javascript easily. there way achieve reverse dom elements order pure css?
this works
div { display:table; } input { display:table-footer-group; } label { display:table-header-group; }
Comments
Post a Comment