Skip to content

Instantly share code, notes, and snippets.

@OpenGrid
Created July 24, 2012 15:19
Show Gist options
  • Save OpenGrid/3170621 to your computer and use it in GitHub Desktop.
Save OpenGrid/3170621 to your computer and use it in GitHub Desktop.
Twitter Bootstrap form-horizontal css for form for two column layout
@media (max-width: 980px) {
.form-horizontal .control-group > label {
float: none;
width: auto;
padding-top: 0;
text-align: left;
}
.form-horizontal .controls {
margin-left: 0;
}
.form-horizontal .control-list {
padding-top: 0;
}
.form-horizontal .form-actions {
padding-left: 10px;
padding-right: 10px;
}
}
@fizerkhan
Copy link

It works great. Thanks a lot.

@Floppy
Copy link

Floppy commented Mar 20, 2013

This is fantastic, works beautifully. Thanks!

@ciofudaniel
Copy link

Great!
I want to complete your code width "!important" at margin-left to have effect:

@media (max-width: 980px) {
.form-horizontal .controls {
margin-left: 0!important;
}
}

@DPSever
Copy link

DPSever commented Sep 15, 2013

This works great, thank you very much for the submission!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment