Fix login form layout weirdness on firefox
Fix login form layout weirdness on firefox

--- a/css/gitphp.css
+++ b/css/gitphp.css
@@ -169,13 +169,19 @@
 div.loginForm {
 	padding: 5px 5px;
 }
-div.loginForm label {
+div.loginForm div.field {
+	padding: 2px 0px;
+}
+div.loginForm div.submit {
+	padding: 2px 0px;
+}
+div.loginForm div.field label {
 	float: left;
 	display: block;
 	width: 90px;
-	line-height: 23px;
-}
-div.loginForm input[type='submit'] {
+	line-height: 22px;
+}
+div.loginForm div.submit input[type='submit'] {
 	margin-left: 92px;
 }
 

--- a/js/modules/loginpopup.js
+++ b/js/modules/loginpopup.js
@@ -35,8 +35,10 @@
           passwordDiv.append(passwordField);
           loginForm.append(passwordDiv);
 
+          var loginDiv = $(document.createElement('div')).addClass('submit');
           var loginButton = $(document.createElement('input')).attr('type', 'submit').attr('value', resources.Login);
-          loginForm.append(loginButton);
+          loginDiv.append(loginButton);
+          loginForm.append(loginDiv);
 
           loginForm.bind('submit', function(event) {
             var username = $('input[name=username]', this).val();

--- a/templates/login.tpl
+++ b/templates/login.tpl
@@ -31,7 +31,9 @@
     {if $redirect}
     <input type="hidden" name="redirect" value="{$redirect|escape}" />
     {/if}
+    <div class="submit">
     <input type="submit" value="{t}login{/t}" />
+    </div>
   </form>
 </div>
 {/block}

comments