Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #19177 -- Better layout for admin login form field labels.

Thanks goes to void for the comprehensive report, to Pedro Mourelle for
the fix and to Bryan Veloso, Łukasz Rekucki and Claude Paroz for the

This fix includes the following changes:

* Modified layout to top-aligned labels.
* Added 'air' for inputs (the padding was really needed there.). It
  adjust good to zoom in/out.
* Removed float attributes from label and inputs in login form.
* Removed useless text-align property.
  • Loading branch information...
1 parent 8e8c9b9 commit 0868e5a8ac6811fffcb25e9dc8248d87d25abcd1 @pedromagnus pedromagnus committed with ramiro
Showing with 7 additions and 4 deletions.
  1. +7 −4 django/contrib/admin/static/admin/css/login.css
11 django/contrib/admin/static/admin/css/login.css
@@ -29,17 +29,20 @@ body.login {
.login .form-row label {
- float: left;
- width: 9em;
padding-right: 0.5em;
line-height: 2em;
- text-align: right;
font-size: 1em;
+ clear: both;
color: #333;
.login .form-row #id_username, .login .form-row #id_password {
- width: 14em;
+ clear: both;
+ padding: 6px;
+ width: 100%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
.login {

1 comment on commit 0868e5a


Thanks a lot Ramiro. I screw up when trying to use squash and mess it like a sir :P.

Please sign in to comment.
Something went wrong with that request. Please try again.