DEV Community

Kyle Keesling
Kyle Keesling

Posted on • Originally published at kylekeesling.dev on

Bootstrap 3 Responsive Button Groups

Ever been disappointed/pissed off with how Bootstrap handles (read ignores) button formatting on smaller screens? Check this out:

@media (max-width: $screen-xs-max) {
.btn-group-responsive {
width: 100%;
margin-bottom: 10px;
.pull-left, .pull-right { float: none; }
.btn {
border-radius: $btn-border-radius-small !important;
display: block;
width: 100%;
padding-right: 0;
padding-left: 0;
margin-bottom: 10px;
}
.btn:last-child { margin-bottom: 0px; }
}
}

Makes this:

Look like this:

Permalink ∞

Top comments (1)

Collapse
 
sidekickdan profile image
Danny Leary

Thanks sooo much! it works great. I think there was just one missing } after the .btn-group-responsive class. Other than that i just added a pixel width and it worked great. Thank you again!

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay