Skip to content

Instantly share code, notes, and snippets.

@kdarty
Created October 20, 2016 19:02
Show Gist options
  • Save kdarty/898aa812d3069e2411a142ca08acf215 to your computer and use it in GitHub Desktop.
Save kdarty/898aa812d3069e2411a142ca08acf215 to your computer and use it in GitHub Desktop.
Bootstrap Style Button Group made Responsive slimming down to just Icons on Mobile View. I saw this example in a Stack Overflow discussion and thought it was a pretty nice solution to make sure your Button Groups re-size down gracefully in a fully usable form leaving only the icons in tact for Mobile View.
<!-- Source: http://stackoverflow.com/questions/21988395/bootstrap-3-btn-group-non-responsive-behavior-on-small-screens -->
<!-- Demo: http://jsfiddle.net/Jeen/w33GD/4/ -->
<!-- NOTE: The use of a SPAN Element with the Style Class "hidden-xs" makes it hide for Small Screens -->
<div class="btn-group">
<button class="btn btn-default" title="View"><i class="fa fa-eye"></i><span class="hidden-xs"> View</span></button>
<button class="btn btn-default" title="Delete"><i class="fa fa-times"></i><span class="hidden-xs"> Delete</span></button>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment