Skip to content Skip to sidebar Skip to footer

How Can I Ensure A Bootstrap Column Expands To Fit The Width Of Its Content When This Value Is Changed?

I have the following very simple Bootstrap grid system:

.col-sm-2 { border:1px solid; }

@media screen and (min-width: 480px) {
  .flex { display: flex; flex-wrap: wrap; }
  .flex > .col-sm-2 { flex: 1; width: auto; }
}
<linkhref="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"rel="stylesheet"/><h2> RScheme </h2><divclass="container-fluid"><divclass="row flex"><divclass="col-sm-2"><imgsrc="http://placehold.it/200x200"></div><divclass="col-sm-2">Arrow</div><divclass="col-sm-2">Compound</div><divclass="col-sm-2">Arrow</div><divclass="col-sm-2">Compound</div><divclass="col-sm-2">Arrow</div></div></div>

jsFiddle: http://jsfiddle.net/rbxth6ac/8/

Post a Comment for "How Can I Ensure A Bootstrap Column Expands To Fit The Width Of Its Content When This Value Is Changed?"