Below is the example code showcasing #data
in either md-12
or sm-6
depending on browser width. Under certain conditions (such as a special preview mode triggered by JavaScript), I wish to override the rendering rules for #data
and display only in col-md-12
even on small screens.
I prefer not to remove any classes from the DOM, but instead seek a solution using .parent
(where I can add a class) to overwrite its child's rendering rules.
In essence, I aim to compel Bootstrap to display content in md
mode while disregarding browser width.
I am also curious if adjusting the viewport
value could resolve this issue?
<div class="parent">
<div class="row">
<div id="data" class="col-md-12 col-sm-6">data</div>
</div>
</div>