Bug 1628497 - Improve Account Manager UI. r=aleca
authorRichard Marti <richard.marti@gmail.com>
Sat, 23 May 2020 13:13:51 +0300
changeset 39217 1ba42b85d43f98c9b8b8c32e467d58bf82d8e4f6
parent 39216 b12d34446556d9b4356cc0a7d314cab6c3c55967
child 39218 1f54197e9163125c2b1ec3a0a121b77dd0e86fa6
push id402
push userclokep@gmail.com
push dateMon, 29 Jun 2020 20:48:04 +0000
reviewersaleca
bugs1628497
Bug 1628497 - Improve Account Manager UI. r=aleca
mail/components/im/content/am-im.xhtml
mail/extensions/am-e2e/am-e2e.xhtml
mail/locales/en-US/chrome/messenger/am-server-top.dtd
mail/themes/shared/mail/accountManage.css
mail/themes/shared/mail/preferences/dialog.css
mailnews/base/prefs/content/AccountManager.xhtml
mailnews/base/prefs/content/SmtpServerEdit.js
mailnews/base/prefs/content/SmtpServerEdit.xhtml
mailnews/base/prefs/content/am-addressing.inc.xhtml
mailnews/base/prefs/content/am-addressing.xhtml
mailnews/base/prefs/content/am-copies.inc.xhtml
mailnews/base/prefs/content/am-copies.xhtml
mailnews/base/prefs/content/am-identity-edit.js
mailnews/base/prefs/content/am-identity-edit.xhtml
mailnews/base/prefs/content/am-junk.xhtml
mailnews/base/prefs/content/am-main.xhtml
mailnews/base/prefs/content/am-offline.js
mailnews/base/prefs/content/am-offline.xhtml
mailnews/base/prefs/content/am-server-advanced.xhtml
mailnews/base/prefs/content/am-server.js
mailnews/base/prefs/content/am-server.xhtml
mailnews/base/prefs/content/am-serverwithnoidentities.xhtml
mailnews/base/prefs/content/am-smtp.xhtml
mailnews/extensions/mdn/content/am-mdn.xhtml
mailnews/extensions/newsblog/content/am-newsblog.xhtml
--- a/mail/components/im/content/am-im.xhtml
+++ b/mail/components/im/content/am-im.xhtml
@@ -25,17 +25,17 @@
   <script src="chrome://messenger/content/am-im.js"/>
 
   <linkset>
     <html:link rel="localization" href="branding/brand.ftl"/>
     <html:link rel="localization" href="messenger/preferences/am-im.ftl"/>
     <html:link rel="localization" href="messenger/otr/am-im-otr.ftl"/>
   </linkset>
 
-  <vbox flex="1" style="overflow: auto;">
+  <vbox flex="1" style="overflow: auto;"><vbox id="containerBox" flex="1">
     <hbox class="dialogheader">
       <label class="dialogheader-title" defaultTitle="&accountWindow.title;"/>
     </hbox>
 
 
       <hbox align="center">
         <image id="protocolIcon"/>
         <vbox flex="1">
@@ -80,24 +80,27 @@
                           wsm_persist="true"
                           genericattr="true"
                           class="input-inline"/>
             </hbox>
             <separator class="thin"/>
 
             <vbox id="autojoinBox" hidden="true">
               <label class="header" data-l10n-id="account-channelTitle" />
-              <vbox>
-                <label value="&account.autojoin;" control="server.autojoin" flex="1"/>
+              <hbox class="input-container">
+                <label class="label-inline"
+                       value="&account.autojoin;"
+                       control="server.autojoin"
+                       flex="1"/>
                 <html:input id="server.autojoin"
                             type="text"
                             preftype="wstring"
                             genericattr="true"
                             class="input-inline"/>
-              </vbox>
+              </hbox>
               <separator class="thin"/>
             </vbox>
             <vbox id="advanced">
               <label class="header">&account.advanced;</label>
               <vbox id="protoSpecific" flex="1"/>
             </vbox>
           </tabpanel>
 
@@ -130,27 +133,29 @@
             </vbox>
 
             <separator/>
 
             <vbox>
               <label class="header" data-l10n-id="otr-encryption-title" />
               <label data-l10n-id="otr-encryption-caption" />
               <separator class="thin"/>
-              <hbox align="baseline" class="input-container">
+              <hbox align="center">
                 <label data-l10n-id="otr-fingerprint-label" />
-                <html:input id="otrFingerprint"
-                            type="text"
-                            class="input-inline"
-                            readonly="readonly"/>
+                <hbox class="input-container" flex="1">
+                  <html:input id="otrFingerprint"
+                              type="text"
+                              class="input-inline"
+                              readonly="readonly"/>
+                </hbox>
               </hbox>
               <separator class="thin"/>
-              <hbox pack="start">
+              <hbox pack="end">
                 <button id="viewFingerprintButton"
                         data-l10n-id="view-fingerprint-button"
                         oncommand="account.viewFingerprintKeys();"/>
               </hbox>
             </vbox>
           </tabpanel>
         </tabpanels>
       </tabbox>
-  </vbox>
+  </vbox></vbox>
 </window>
--- a/mail/extensions/am-e2e/am-e2e.xhtml
+++ b/mail/extensions/am-e2e/am-e2e.xhtml
@@ -11,17 +11,19 @@
         class="color-dialog"
         onload="parent.onPanelLoaded('am-e2e.xhtml');">
 
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://global/content/editMenuOverlay.js"/>
   <script src="chrome://messenger/content/AccountManager.js"/>
   <script src="chrome://messenger/content/am-e2e.js"/>
 
-  <vbox flex="1" style="overflow: auto;">
+  <vbox flex="1" style="overflow: auto;"><vbox id="containerBox" flex="1">
     <hbox class="dialogheader">
       <label class="dialogheader-title" value="&e2eTitle.label;"/>
     </hbox>
 
+    <separator class="thin"/>
+
 #include am-e2e.inc.xhtml
-  </vbox>
+  </vbox></vbox>
 
 </window>
--- a/mail/locales/en-US/chrome/messenger/am-server-top.dtd
+++ b/mail/locales/en-US/chrome/messenger/am-server-top.dtd
@@ -61,25 +61,25 @@
     of messages between them
 -->
 <!ENTITY maxMessagesStart.label "Ask me before downloading more than">
 <!ENTITY maxMessagesStart.accesskey "m">
 <!-- LOCALIZATION NOTE (maxMessagesEnd.label) : see note for maxMessagesStart.label -->
 <!ENTITY maxMessagesEnd.label "messages">
 <!ENTITY alwaysAuthenticate.label "Always request authentication when connecting to this server">
 <!ENTITY alwaysAuthenticate.accesskey "w">
-<!ENTITY newsrcFilePath.label "newsrc file:">
-<!ENTITY newsrcPicker.label "Select newsrc File">
+<!ENTITY newsrcFilePath1.label "News.rc File:">
+<!ENTITY newsrcPicker1.label "Select News.rc File">
 <!ENTITY abbreviate.label "Show newsgroup names in the Mail Folder pane as:">
 <!ENTITY abbreviateOn.label "Full names (For example, 'netscape.public.mozilla.mail-news')">
 <!ENTITY abbreviateOff.label "Abbreviate names (For example, 'n.p.m.mail-news')">
 <!ENTITY advancedButton.label "Advanced…">
 <!ENTITY advancedButton.accesskey "v">
 <!ENTITY serverDefaultCharset2.label "Default Text Encoding:">
-<!ENTITY localPath.label "Local directory:">
+<!ENTITY localPath1.label "Local Directory:">
 <!ENTITY localFolderPicker.label "Select Local Directory">
 <!ENTITY browseFolder.label "Browse…">
 <!ENTITY browseFolder.accesskey "B">
 <!ENTITY browseNewsrc.label "Browse…">
 <!ENTITY browseNewsrc.accesskey "e">
 
 <!ENTITY accountTitle.label "Account Settings">
 <!ENTITY accountSettingsDesc.label "The following is a special account.  There are no identities associated with it.">
--- a/mail/themes/shared/mail/accountManage.css
+++ b/mail/themes/shared/mail/accountManage.css
@@ -7,37 +7,59 @@
   ======================================================================= */
 
 @import url("chrome://messenger/skin/messenger.css");
 @import url("chrome://global/skin/in-content/common.css");
 @import url("chrome://messenger/skin/preferences/preferences.css");
 
 window > vbox {
   padding-block: 40px;
-  padding-inline: 25px 28px;
+  padding-inline: 24px 28px;
+}
+
+#containerBox {
+  max-width: 800px;
 }
 
 fieldset {
   margin: 0 0 32px;
   padding: initial;
 }
 
 fieldset:last-of-type {
   margin-bottom: 0;
 }
 
 #accountTreeBox {
-  margin-block: 28px;
-  margin-inline: 28px 3px;
+  background-image: linear-gradient(to left, transparent, transparent 3px,
+                    var(--in-content-categories-background) 3px);
+  padding-block: 28px;
+  padding-inline: 28px 4px;
+}
+
+#accountTreeBox:-moz-locale-dir(rtl) {
+  background-image: linear-gradient(to right, transparent, transparent 3px,
+                    var(--in-content-categories-background) 3px);
+}
+
+#accounttree {
+  background-color: transparent;
+  border-style: none;
+}
+
+#accounttree > treecols {
+  border-bottom-style: none;
 }
 
 /* Styles for the Account Actions button */
 
 #accountActionsButton {
   margin-inline: 0;
+  border-end-end-radius: 0;
+  border-start-end-radius: 0;
 }
 
 #accountActionsDropdown {
   -moz-appearance: none;
   min-width: 32ch;
   font-size: 1em;
   border: 1px solid var(--in-content-box-border-color);
   border-radius: 2px;
@@ -71,16 +93,21 @@ fieldset:last-of-type {
 #accountActionsDropdown menuseparator {
   -moz-appearance: none;
   margin: 0;
   padding: 0;
   border-top: 1px solid var(--in-content-box-border-color);
   border-bottom: none;
 }
 
+#archiveHierarchyButton,
+#globalJunkPrefsLink {
+  margin-inline-end: 8px;
+}
+
 /* ::::: account manager :::::: */
 
 .header {
   font-size: 1.1em;
   font-weight: 600;
   line-height: 1.4em;
   margin-block: 16px 4px;
   padding-bottom: 0;
@@ -192,29 +219,37 @@ treechildren::-moz-tree-image(folderName
   width: 1ch;
 }
 
 .label-inline {
   margin-block: auto;
   min-width: 200px;
 }
 
+#defaultPort,
+#servertypeVerbose,
+#identityHtmlSigFormat {
+  margin-inline-start: 4px;
+}
+
+#autosyncNotDownload {
+  margin-inline-end: 12px;
+}
+
 /* ::::: SMTP Server Panel :::::: */
 
 .smtpServerListItem {
   padding-inline-start: 3px;
 }
 
-#backgroundBox {
-  background-color: var(--in-content-box-background);
-}
-
 #smtpServerInfoBox {
-  background-color: var(--in-content-box-background);
-  margin: 0 6px 5px;
+  padding: 9px;
+  border: 1px solid var(--in-content-border-color);
+  border-radius: 4px;
+  background-color: rgba(215, 215, 219, 0.2);
 }
 
 #smtpServerInfoBox label {
   height: 30px;
   margin-block: 0;
   padding-block: 3px;
 }
 
--- a/mail/themes/shared/mail/preferences/dialog.css
+++ b/mail/themes/shared/mail/preferences/dialog.css
@@ -111,8 +111,13 @@ textbox.tree-input {
   border: 1px solid var(--in-content-box-border-color);
   margin: 0 4px 5px;
 }
 
 #cookieInfoSettings {
   margin-top: 8px;
   margin-inline-end: -4px;
 }
+
+/* Edit SMTP Server dialog */
+#smtpUsername {
+  margin-inline: 8px 0;
+}
--- a/mailnews/base/prefs/content/AccountManager.xhtml
+++ b/mailnews/base/prefs/content/AccountManager.xhtml
@@ -21,19 +21,19 @@
 #ifdef MOZ_SUITE
 <script src="chrome://messenger/content/am-help.js"/>
 #endif
 <script src="chrome://messenger/content/amUtils.js"/>
 <script src="chrome://messenger/content/preferences/subdialogs.js"/>
 
   <stack id="preferences-stack" flex="1">
   <hbox flex="1">
-    <vbox id="accountTreeBox" style="&accountTree.width;">
-      <tree flex="1" onselect="onAccountTreeSelect(null, null);" id="accounttree"
-            seltype="single" hidecolumnpicker="true">
+    <vbox id="accountTreeBox">
+      <tree id="accounttree" flex="1" onselect="onAccountTreeSelect(null, null);"
+            seltype="single" hidecolumnpicker="true" style="&accountTree.width;">
         <treecols>
           <treecol id="AccountCol" flex="1" primary="true" hideheader="true"/>
         </treecols>
         <treechildren id="account-tree-children"/>
       </tree>
 
 #ifdef MOZ_THUNDERBIRD
       <button id="accountActionsButton" type="menu"
--- a/mailnews/base/prefs/content/SmtpServerEdit.js
+++ b/mailnews/base/prefs/content/SmtpServerEdit.js
@@ -57,19 +57,19 @@ function onAccept(event) {
   } catch (ex) {
     Cu.reportError("Error saving smtp server: " + ex);
   }
 
   window.arguments[0].result = true;
 }
 
 function initSmtpSettings(server) {
-  gSmtpUsername = document.getElementById("smtp.username");
+  gSmtpUsername = document.getElementById("smtpUsername");
   gSmtpDescription = document.getElementById("smtp.description");
-  gSmtpUsernameLabel = document.getElementById("smtp.username.label");
+  gSmtpUsernameLabel = document.getElementById("smtpUsernameLabel");
   gSmtpHostname = document.getElementById("smtp.hostname");
   gSmtpPort = document.getElementById("smtp.port");
   gSmtpAuthMethod = document.getElementById("smtp.authMethod");
   gSmtpSocketType = document.getElementById("smtp.socketType");
   gDefaultPort = document.getElementById("smtp.defaultPort");
   gPort = document.getElementById("smtp.port");
 
   if (server) {
--- a/mailnews/base/prefs/content/SmtpServerEdit.xhtml
+++ b/mailnews/base/prefs/content/SmtpServerEdit.xhtml
@@ -87,19 +87,19 @@
                    control="smtp.socketType"/>
           </hbox>
           <hbox flex="1" align="center">
             <label value="&authMethod.label;"
                    accesskey="&authMethod.accesskey;"
                    control="server.authMethod"/>
           </hbox>
           <hbox flex="1" align="center">
-            <label id="smtp.username.label" value="&userName.label;"
+            <label id="smtpUsernameLabel" value="&userName.label;"
                    accesskey="&userName.accesskey;"
-                   control="smtp.username"/>
+                   control="smtpUsername"/>
           </hbox>
         </vbox>
         <vbox>
           <menulist id="smtp.socketType" oncommand="sslChanged(true);"
                     prefstring="mail.smtpserver.%serverkey%.try_ssl">
             <menupopup id="smtp.socketTypePopup">
               <menuitem value="0" label="&connectionSecurityType-0.label;"/>
               <menuitem id="connectionSecurityType-1"
@@ -120,20 +120,22 @@
               <menuitem id="authMethod-password-encrypted" value="4"/>
               <menuitem id="authMethod-kerberos" value="5"/>
               <menuitem id="authMethod-ntlm" value="6"/>
               <menuitem id="authMethod-oauth2" value="10"/>
               <menuitem id="authMethod-anysecure" value="8"/>
               <menuitem id="authMethod-any" value="9"/>
             </menupopup>
           </menulist>
-          <html:input id="smtp.username"
-                      type="text"
-                      class="input-inline"
-                      preftype="string"
-                      prefstring="mail.smtpserver.%serverkey%.username"
-                      aria-labelledby="smtp.username.label"/>
+          <hbox class="input-container">
+            <html:input id="smtpUsername"
+                        type="text"
+                        class="input-inline"
+                        preftype="string"
+                        prefstring="mail.smtpserver.%serverkey%.username"
+                        aria-labelledby="smtpUsernameLabel"/>
+          </hbox>
         </vbox>
       </hbox>
     </html:fieldset>
   </vbox>
 </dialog>
 </window>
--- a/mailnews/base/prefs/content/am-addressing.inc.xhtml
+++ b/mailnews/base/prefs/content/am-addressing.inc.xhtml
@@ -55,17 +55,17 @@
         <checkbox id="identity.sig_on_fwd" wsm_persist="true"
                   label="&includeSigOnForward.label;"
                   accesskey="&includeSigOnForward.accesskey;"
                   preftype="bool" genericattr="true"
                   prefstring="mail.identity.%identitykey%.sig_on_fwd"/>
 
         <separator class="thin"/>
 
-        <hbox pack="start">
+        <hbox pack="end">
           <button id="globalComposingPrefsLink"
                   label="&globalComposingPrefs.label;"
                   accesskey="&globalComposingPrefs.accesskey;"
                   oncommand="showGlobalComposingPrefs();"/>
         </hbox>
       </html:fieldset>
 
       <separator class="thin"/>
@@ -106,16 +106,16 @@
             <button id="editButton" label="&editDirectories.label;"
                     accesskey="&editDirectories.accesskey;"
                     oncommand="onEditDirectories();"/>
           </hbox>
         </radiogroup>
 
         <separator class="thin"/>
 
-        <hbox pack="start">
+        <hbox pack="end">
           <button id="globalAddressingPrefsLink"
                   label="&globalAddressingPrefs.label;"
                   accesskey="&globalAddressingPrefs.accesskey;"
                   oncommand="showGlobalAddressingPrefs();"/>
         </hbox>
       </html:fieldset>
     </vbox>
--- a/mailnews/base/prefs/content/am-addressing.xhtml
+++ b/mailnews/base/prefs/content/am-addressing.xhtml
@@ -9,19 +9,19 @@
 
 <!DOCTYPE window SYSTEM "chrome://messenger/locale/am-addressing.dtd">
 
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         title="&addressing.label;"
         onload="onLoad();">
 
 
-  <vbox flex="1" style="overflow: auto;">
+  <vbox flex="1" style="overflow: auto;"><vbox id="containerBox" flex="1">
     <script src="chrome://messenger/content/am-addressing.js"/>
     <script src="chrome://messenger/content/amUtils.js"/>
     <script src="chrome://messenger/content/am-prefs.js"/>
 
     <hbox class="dialogheader">
       <label class="dialogheader-title" value="&addressing.label;"/>
     </hbox>
 #include am-addressing.inc.xhtml
-  </vbox>
+  </vbox></vbox>
 </window>
--- a/mailnews/base/prefs/content/am-copies.inc.xhtml
+++ b/mailnews/base/prefs/content/am-copies.inc.xhtml
@@ -85,16 +85,18 @@
         <checkbox id="identity.fccReplyFollowsParent" wsm_persist="true"
                   class="depends-on-do-fcc"
                   label="&fccReplyFollowsParent.label;"
                   accesskey="&fccReplyFollowsParent.accesskey;"
                   prefattribute="value"
                   prefstring="mail.identity.%identitykey%.fcc_reply_follows_parent"/>
       </hbox>
 
+      <separator class="thin"/>
+
       <hbox>
         <vbox>
           <hbox flex="1" align="center">
             <checkbox id="identity.doCc" wsm_persist="true" label="&ccAddress.label;"
                       accesskey="&ccAddress.accesskey;"
                       control="identity.doCcList"
                       oncommand="setupCcTextbox();"
                       prefattribute="value"
@@ -124,29 +126,23 @@
                       placeholder="&bccAddressList.placeholder;"/>
         </vbox>
       </hbox>
     </html:fieldset>
 
     <html:fieldset id="archivesGroup">
       <html:legend>&archivesTitle.label;</html:legend>
 
-      <hbox align="center">
+      <hbox pack="start">
         <checkbox id="identity.archiveEnabled" wsm_persist="true"
                   label="&keepArchives.label;"
                   accesskey="&keepArchives.accesskey;"
                   prefattribute="value"
                   prefstring="mail.identity.%identitykey%.archive_enabled"
                   oncommand="setupArchiveItems();"/>
-        <spacer flex="1"/>
-        <button id="archiveHierarchyButton"
-                class="depends-on-archive"
-                label="&archiveHierarchyButton.label;"
-                accesskey="&archiveHierarchyButton.accesskey;"
-                oncommand="ChangeArchiveHierarchy();"/>
       </hbox>
 
       <radiogroup id="messageArchives">
         <hbox class="specialFolderPickerGrid">
           <vbox>
             <hbox flex="1" align="center">
               <radio id="archive_selectAccount"
                      class="depends-on-archive"
@@ -179,16 +175,23 @@
                          mode="filing"
                          class="menulist-menupopup"
                          showFileHereLabel="true"
                          oncommand="noteSelectionChange('archive', 'Folder', event)"/>
             </menulist>
           </vbox>
         </hbox>
       </radiogroup>
+      <hbox pack="end">
+        <button id="archiveHierarchyButton"
+                class="depends-on-archive"
+                label="&archiveHierarchyButton.label;"
+                accesskey="&archiveHierarchyButton.accesskey;"
+                oncommand="ChangeArchiveHierarchy();"/>
+      </hbox>
     </html:fieldset>
 
     <html:fieldset id="foldersGroup">
       <html:legend>&specialFolders.label;</html:legend>
 
       <hbox align="center">
         <label value="&keepDrafts2.label;" control="messageDrafts"/>
       </hbox>
@@ -227,16 +230,18 @@
                          class="menulist-menupopup"
                          showFileHereLabel="true"
                          oncommand="noteSelectionChange('draft', 'Folder', event)"/>
             </menulist>
           </vbox>
         </hbox>
       </radiogroup>
 
+      <separator class="thin"/>
+
       <hbox align="center">
         <label value="&keepTemplates.label;" control="messageTemplates"/>
       </hbox>
 
       <radiogroup id="messageTemplates">
         <hbox class="specialFolderPickerGrid">
           <vbox>
             <hbox flex="1" align="center">
--- a/mailnews/base/prefs/content/am-copies.xhtml
+++ b/mailnews/base/prefs/content/am-copies.xhtml
@@ -11,19 +11,19 @@
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         title="&copyAndFolderTitle.label;"
         onload="parent.onPanelLoaded('am-copies.xhtml');">
 
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://global/content/editMenuOverlay.js"/>
 
-  <vbox flex="1" style="overflow: auto;">
+  <vbox flex="1" style="overflow: auto;"><vbox id="containerBox" flex="1">
     <script src="chrome://messenger/content/am-copies.js"/>
     <script src="chrome://messenger/content/am-prefs.js"/>
     <script src="chrome://messenger/content/amUtils.js"/>
 
     <hbox class="dialogheader">
       <label class="dialogheader-title" value="&copyAndFolderTitle.label;"/>
     </hbox>
 #include am-copies.inc.xhtml
-  </vbox>
+  </vbox></vbox>
 </window>
--- a/mailnews/base/prefs/content/am-identity-edit.js
+++ b/mailnews/base/prefs/content/am-identity-edit.js
@@ -53,18 +53,18 @@ function initIdentityValues(identity) {
     document.getElementById("identity.email").value = identity.email;
     document.getElementById("identity.replyTo").value = identity.replyTo;
     document.getElementById("identity.organization").value =
       identity.organization;
     document.getElementById("identity.attachSignature").checked =
       identity.attachSignature;
     document.getElementById("identity.htmlSigText").value =
       identity.htmlSigText;
-    document.getElementById("identity.htmlSigFormat").checked =
-      identity.htmlSigFormat;
+    document.getElementById("identityHtmlSigFormat").checked =
+      identityHtmlSigFormat;
 
     if (identity.signature) {
       document.getElementById("identity.signature").value =
         identity.signature.path;
     }
 
     document.getElementById("identity.attachVCard").checked =
       identity.attachVCard;
@@ -240,18 +240,18 @@ function saveIdentitySettings(identity) 
       "identity.organization"
     ).value;
     identity.attachSignature = document.getElementById(
       "identity.attachSignature"
     ).checked;
     identity.htmlSigText = document.getElementById(
       "identity.htmlSigText"
     ).value;
-    identity.htmlSigFormat = document.getElementById(
-      "identity.htmlSigFormat"
+    identityHtmlSigFormat = document.getElementById(
+      "identityHtmlSigFormat"
     ).checked;
 
     identity.attachVCard = document.getElementById(
       "identity.attachVCard"
     ).checked;
     identity.escapedVCard = document.getElementById(
       "identity.escapedVCard"
     ).value;
@@ -393,17 +393,17 @@ function GetSigFolder() {
 // displays the absolute path to the signature (in a textbox) and the way
 // to select a new signature file (a button) are enabled. Otherwise, they
 // are disabled. Check to see if the attachSignature is locked to block
 // broadcasting events.
 function setupSignatureItems() {
   var signature = document.getElementById("identity.signature");
   var browse = document.getElementById("identity.sigbrowsebutton");
   var htmlSigText = document.getElementById("identity.htmlSigText");
-  var htmlSigFormat = document.getElementById("identity.htmlSigFormat");
+  var htmlSigFormat = document.getElementById("identityHtmlSigFormat");
   var attachSignature = document.getElementById("identity.attachSignature");
   var checked = attachSignature.checked;
 
   if (checked) {
     htmlSigText.setAttribute("disabled", "disabled");
     htmlSigFormat.setAttribute("disabled", "true");
   } else {
     htmlSigText.removeAttribute("disabled");
--- a/mailnews/base/prefs/content/am-identity-edit.xhtml
+++ b/mailnews/base/prefs/content/am-identity-edit.xhtml
@@ -121,17 +121,17 @@
               </html:td>
             </html:tr>
             <html:tr>
               <html:th>
                 <label value="&signatureText.label;" control="identity.htmlSigText"
                        accesskey="&signatureText.accesskey;"/>
               </html:th>
               <html:td style="width:100%;">
-                <checkbox id="identity.htmlSigFormat" label="&signatureHtml.label;"
+                <checkbox id="identityHtmlSigFormat" label="&signatureHtml.label;"
                           accesskey="&signatureHtml.accesskey;" style="width:100%;"/>
               </html:td>
             </html:tr>
           </html:table>
 
           <separator class="thin"/>
 
           <hbox class="indent input-container" flex="1">
--- a/mailnews/base/prefs/content/am-junk.xhtml
+++ b/mailnews/base/prefs/content/am-junk.xhtml
@@ -13,17 +13,17 @@
 <!ENTITY % junkMailDTD SYSTEM "chrome://messenger/locale/am-junk.dtd">
 %junkMailDTD;
 ]>
 
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         title="&junkSettings.label;"
         onload="parent.onPanelLoaded('am-junk.xhtml');">
 
-  <vbox flex="1" style="overflow: auto;">
+  <vbox flex="1" style="overflow: auto;"><vbox id="containerBox" flex="1">
     <script src="chrome://messenger/content/am-junk.js"/>
     <script src="chrome://messenger/content/am-prefs.js"/>
     <script src="chrome://messenger/content/amUtils.js"/>
     <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
 
     <hbox class="dialogheader">
       <label class="dialogheader-title" value="&junkSettings.label;"/>
     </hbox>
@@ -209,17 +209,17 @@
                value="&purge2.label;"
                control="server.purgeSpamInterval"/>
       </hbox>
 
     </html:fieldset>
 
     <separator class="thin"/>
 
-    <hbox pack="start">
+    <hbox pack="end">
       <button id="globalJunkPrefsLink"
               label="&globalJunkPrefs.label;"
               accesskey="&globalJunkPrefs.accesskey;"
               oncommand="showGlobalJunkPrefs();"/>
     </hbox>
 
-  </vbox>
+  </vbox></vbox>
 </window>
--- a/mailnews/base/prefs/content/am-main.xhtml
+++ b/mailnews/base/prefs/content/am-main.xhtml
@@ -6,45 +6,47 @@
 <?xml-stylesheet href="chrome://messenger/skin/accountManage.css" type="text/css"?>
 
 <!DOCTYPE window SYSTEM "chrome://messenger/locale/am-main.dtd" >
 
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         onload="parent.onPanelLoaded('am-main.xhtml');">
 
-  <vbox flex="1" style="overflow: auto;">
+  <vbox flex="1" style="overflow: auto;"><vbox id="containerBox" flex="1">
     <stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
     <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
 
     <script src="chrome://global/content/globalOverlay.js"/>
     <script src="chrome://global/content/editMenuOverlay.js"/>
     <script src="chrome://messenger/content/am-identity-edit.js"/>
     <script src="chrome://messenger/content/am-main.js"/>
     <script src="chrome://messenger/content/am-prefs.js"/>
     <script src="chrome://messenger/content/amUtils.js"/>
 
     <hbox id="am-main-title" class="dialogheader">
       <label class="dialogheader-title" defaultTitle="&accountTitle.label;"/>
     </hbox>
 
+    <separator class="thin"/>
+
     <hbox align="center">
       <label id="server.prettyName.label" value="&accountName.label;"
              control="server.prettyName" accesskey="&accountName.accesskey;"/>
       <html:input id="server.prettyName"
                   type="text"
                   wsm_persist="true"
                   size="30"
                   class="input-inline"
                   onblur="parent.setAccountLabel(gAccount.key, null, this.value);"
                   prefstring="mail.server.%serverkey%.name"
                   aria-labelledby="server.prettyName.label"/>
     </hbox>
 
-    <separator class="thin"/>
+    <separator/>
 
     <html:fieldset style="width:20em !important;">
       <html:legend>&identityTitle.label;</html:legend>
       <description>&identityDesc.label;</description>
       <separator class="thin"/>
       <html:table class="identity-table">
         <html:tr>
           <html:th>
@@ -105,17 +107,17 @@
         </html:tr>
         <html:tr>
           <html:th>
             <label value="&signatureText.label;" control="identity.htmlSigText"
                    accesskey="&signatureText.accesskey;"/>
           </html:th>
           <html:td style="width:100%;">
             <hbox align="center">
-              <checkbox id="identity.htmlSigFormat" wsm_persist="true" label="&signatureHtml.label;"
+              <checkbox id="identityHtmlSigFormat" wsm_persist="true" label="&signatureHtml.label;"
                         prefattribute="value" accesskey="&signatureHtml.accesskey;" style="width:100%;"
                         prefstring="mail.identity.%identitykey%.htmlSigFormat"/>
             </hbox>
           </html:td>
         </html:tr>
       </html:table>
 
       <hbox class="indent" flex="1" style="min-height:100px; display:flex;">
@@ -160,19 +162,19 @@
                 oncommand="editVCard()"/>
         <label hidden="true" wsm_persist="true" id="identity.escapedVCard"
                   pref="true" preftype="string" prefattribute="value"
                   prefstring="mail.identity.%identitykey%.escapedVCard"/>
       </hbox>
 
       <separator class="thin"/>
 
-      <label value="&smtpName.label;" control="identity.smtpServerKey"
-             accesskey="&smtpName.accesskey;"/>
       <hbox align="center">
+        <label value="&smtpName.label;" control="identity.smtpServerKey"
+               accesskey="&smtpName.accesskey;"/>
         <menulist wsm_persist="true" id="identity.smtpServerKey" flex="1"
                   pref="true" preftype="string" prefattribute="value"
                   prefstring="mail.identity.%identitykey%.smtpServer">
           <menupopup id="smtpPopup">
             <menuitem value="" label="&smtpDefaultServer.label;" id="useDefaultItem"/>
             <menuseparator/>
             <!-- list will be inserted here -->
           </menupopup>
@@ -188,10 +190,10 @@
       <hbox align="center">
         <spacer flex="1"/>
         <button label="&manageIdentities.label;" oncommand="manageIdentities(event);"
                 accesskey="&manageIdentities.accesskey;"
                 wsm_persist="true" id="identity.manageIdentitiesbutton"/>
       </hbox>
     <!-- When the fieldset overflow works, move this back above the last separator -->
     </html:fieldset>
-  </vbox>
+  </vbox></vbox>
 </window>
--- a/mailnews/base/prefs/content/am-offline.js
+++ b/mailnews/base/prefs/content/am-offline.js
@@ -43,17 +43,17 @@ function initOfflineSettings() {
   gOfflineMap = collectOfflineFolders();
   gOfflineFolders = document.getElementById("offline.folders").checked;
   gToggleOccurred = false;
 }
 
 function initServerSettings() {
   document.getElementById("offline.notDownload").checked =
     gIncomingServer.limitOfflineMessageSize;
-  document.getElementById("autosync.notDownload").checked =
+  document.getElementById("autosyncNotDownload").checked =
     gIncomingServer.limitOfflineMessageSize;
   if (gIncomingServer.maxMessageSize > 0) {
     document.getElementById("offline.notDownloadMin").value =
       gIncomingServer.maxMessageSize;
   } else {
     document.getElementById("offline.notDownloadMin").value = "50";
   }
 
@@ -216,17 +216,17 @@ function onAutosyncChange() {
 }
 
 function onAutosyncNotDownload() {
   // This function is called when the autosync version of offline.notDownload
   // is changed it simply copies the new checkbox value over to the element
   // driving the preference.
   document.getElementById(
     "offline.notDownload"
-  ).checked = document.getElementById("autosync.notDownload").checked;
+  ).checked = document.getElementById("autosyncNotDownload").checked;
   onCheckItem1("offline.notDownloadMin", "offline.notDownload");
 }
 
 function onCancel() {
   // restore the offline flags for all folders
   restoreOfflineFolders(gOfflineMap);
   document.getElementById("offline.folders").checked = gOfflineFolders;
 }
@@ -348,17 +348,17 @@ function onLockPreference() {
   var initPrefString = "mail.server";
   var finalPrefString;
 
   // This panel does not use the code in AccountManager.js to handle
   // the load/unload/disable.  keep in mind new prefstrings and changes
   // to code in AccountManager, and update these as well.
   var allPrefElements = [
     { prefstring: "limit_offline_message_size", id: "offline.notDownload" },
-    { prefstring: "limit_offline_message_size", id: "autosync.notDownload" },
+    { prefstring: "limit_offline_message_size", id: "autosyncNotDownload" },
     { prefstring: "max_size", id: "offline.notDownloadMin" },
     { prefstring: "downloadUnreadOnly", id: "nntp.notDownloadRead" },
     { prefstring: "downloadByDate", id: "nntp.downloadMsg" },
     { prefstring: "ageLimit", id: "nntp.downloadMsgMin" },
     { prefstring: "retainBy", id: "retention.keepMsg" },
     { prefstring: "daysToKeepHdrs", id: "retention.keepOldMsgMin" },
     { prefstring: "numHdrsToKeep", id: "retention.keepNewMsgMin" },
     { prefstring: "daysToKeepBodies", id: "nntp.removeBodyMin" },
--- a/mailnews/base/prefs/content/am-offline.xhtml
+++ b/mailnews/base/prefs/content/am-offline.xhtml
@@ -5,32 +5,34 @@
 
 <?xml-stylesheet href="chrome://messenger/skin/accountManage.css" type="text/css"?>
 
 <!DOCTYPE window SYSTEM "chrome://messenger/locale/am-offline.dtd">
 
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         onload="parent.onPanelLoaded('am-offline.xhtml');">
 
-  <vbox flex="1" style="overflow: auto;">
+  <vbox flex="1" style="overflow: auto;"><vbox id="containerBox" flex="1">
     <stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
 
     <script src="chrome://messenger/content/retention.js"/>
     <script src="chrome://messenger/content/am-offline.js"/>
     <script src="chrome://messenger/content/am-prefs.js"/>
 
     <label hidden="true" wsm_persist="true" id="server.type"/>
     <label id="imap.autoSyncMaxAgeDays" hidden="true"
            wsm_persist="true" preftype="int"
            prefstring="mail.server.%serverkey%.autosync_max_age_days"/>
 
     <hbox id="headertitle" class="dialogheader">
       <label class="dialogheader-title"/>
     </hbox>
 
+    <separator class="thin"/>
+
     <html:fieldset id="offline.titlebox" hidefor="movemail,pop3,none,rss">
       <html:legend>&syncGroupTitle.label;</html:legend>
 
       <vbox>
         <checkbox hidefor="movemail,pop3,nntp,none"
                   id="offline.folders" label="&allFoldersOffline2.label;"
                   oncommand="toggleOffline()"
                   accesskey="&allFoldersOffline2.accesskey;"/>
@@ -89,17 +91,17 @@
                   accesskey="&nntpNotDownloadRead.accesskey;"/>
     </hbox>
 
     <hbox align="center" class="indent" hidefor="none,rss">
         <checkbox wsm_persist="true" id="offline.notDownload" hidefor="imap"
                   label="&offlineNotDownload.label;"
                   accesskey="&offlineNotDownload.accesskey;"
                   oncommand="onCheckItem('offline.notDownloadMin', 'offline.notDownload');"/>
-        <checkbox wsm_persist="true" id="autosync.notDownload" hidefor="pop3,nntp,movemail"
+        <checkbox wsm_persist="true" id="autosyncNotDownload" hidefor="pop3,nntp,movemail"
                   label="&autosyncNotDownload.label;"
                   accesskey="&autosyncNotDownload.accesskey;"
                   oncommand="onAutosyncNotDownload();"/>
         <html:input id="offline.notDownloadMin" type="number"
                     class="size4 input-inline"
                     min="1" value="50"
                     wsm_persist="true"
                     aria-labelledby="offline.notDownload offline.notDownloadMin kbLabel"/>
@@ -159,10 +161,10 @@
                   label="&nntpRemoveMsgBody.label;" oncommand="onCheckItem('nntp.removeBodyMin', 'nntp.removeBody');"/>
         <html:input id="nntp.removeBodyMin" type="number"
                     class="size2 input-inline" min="1" value="30"
                     aria-labelledby="nntp.removeBody nntp.removeBodyMin daysOldMsg"/>
         <label value="&daysOld.label;" control="nntp.removeBodyMin" id="daysOldMsg"/>
     </hbox>
     </vbox>
     </html:fieldset>
-  </vbox>
+  </vbox></vbox>
 </window>
--- a/mailnews/base/prefs/content/am-server-advanced.xhtml
+++ b/mailnews/base/prefs/content/am-server-advanced.xhtml
@@ -22,26 +22,28 @@
                 src="chrome://messenger/locale/prefs.properties"/>
 
     <label id="serverPrettyName"/>
 
     <separator class="thin"/>
 
     <!-- IMAP Panel -->
     <vbox id="imapPanel">
-      <hbox align="center" class="input-container">
+      <hbox align="center">
         <label id="serverDirectoryLabel"
                value="&serverDirectory.label;"
                accesskey="&serverDirectory.accesskey;"
                control="serverDirectory"/>
-        <html:input id="serverDirectory"
-                    type="text"
-                    class="input-inline"
-                    aria-labelledby="serverDirectoryLabel"
-                    amsa_persist="true"/>
+        <hbox class="input-container">
+          <html:input id="serverDirectory"
+                      type="text"
+                      class="input-inline"
+                      aria-labelledby="serverDirectoryLabel"
+                      amsa_persist="true"/>
+        </hbox>
       </hbox>
 
       <checkbox id="usingSubscription" amsa_persist="true"
                 label="&usingSubscription.label;"
                 accesskey="&usingSubscription.accesskey;"/>
 
       <checkbox id="dualUseFolders" amsa_persist="true"
                 label="&dualUseFolders.label;"
--- a/mailnews/base/prefs/content/am-server.js
+++ b/mailnews/base/prefs/content/am-server.js
@@ -161,17 +161,17 @@ function initServerType() {
   var verboseName;
   try {
     verboseName = messengerBundle.getString(propertyName);
   } catch (e) {
     // Addon-provided server types do not have a description string,
     // then display the raw server type.
     verboseName = serverType;
   }
-  setDivText("servertype.verbose", verboseName);
+  setDivText("servertypeVerbose", verboseName);
 
   secureSelect(true);
 
   setLabelFromStringBundle("authMethod-no", "authNo");
   setLabelFromStringBundle("authMethod-old", "authOld");
   setLabelFromStringBundle("authMethod-kerberos", "authKerberos");
   setLabelFromStringBundle("authMethod-external", "authExternal");
   setLabelFromStringBundle("authMethod-ntlm", "authNTLM");
--- a/mailnews/base/prefs/content/am-server.xhtml
+++ b/mailnews/base/prefs/content/am-server.xhtml
@@ -13,17 +13,17 @@
 ]>
 
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         title="&serverSettings.label;"
         onload="parent.onPanelLoaded('am-server.xhtml');">
 
-  <vbox flex="1" style="overflow: auto;">
+  <vbox flex="1" style="overflow: auto;"><vbox id="containerBox" flex="1">
     <script src="chrome://global/content/globalOverlay.js"/>
     <script src="chrome://global/content/editMenuOverlay.js"/>
     <script src="chrome://messenger/content/am-server.js"/>
     <script src="chrome://messenger/content/am-prefs.js"/>
     <script src="chrome://messenger/content/amUtils.js"/>
     <script src="chrome://messenger/content/menulist-charsetpicker.js"/>
     <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
 
@@ -35,22 +35,24 @@
            prefstring="mail.server.%serverkey%.storeContractID"
            genericattr="true"
            id="server.storeContractID"/>
 
     <hbox class="dialogheader">
       <label class="dialogheader-title" value="&serverSettings.label;"/>
     </hbox>
 
+    <separator class="thin"/>
+
     <div xmlns="http://www.w3.org/1999/xhtml" id="amServerSetting">
       <div>
         <xul:label value="&serverType.label;"/>
       </div>
       <div>
-        <xul:label id="servertype.verbose"/>
+        <xul:label id="servertypeVerbose"/>
       </div>
       <div style="grid-row: 2;">
         <xul:label value="&serverName.label;" accesskey="&serverName.accesskey;"
                    control="server.realHostName"/>
       </div>
       <div class="input-container" style="grid-row: 2;">
         <xul:label id="fixedServerName" collapsed="true" use="server.realHostName"/>
         <html:input id="server.realHostName"
@@ -87,28 +89,28 @@
                     wsm_persist="true"
                     size="20"
                     class="input-flex input-inline"
                     prefstring="mail.server.%serverkey%.realusername"
                     aria-labelledby="fixedUserName"/>
       </div>
     </div>
 
-    <separator class="thin"/>
+    <separator/>
 
     <html:fieldset hidefor="movemail">
       <html:legend>&securitySettings.label;</html:legend>
       <html:table>
         <html:tr>
           <html:td>
             <label value="&connectionSecurity.label;"
                    accesskey="&connectionSecurity.accesskey;"
                    control="server.socketType"/>
           </html:td>
-          <html:td style="width:100%;">
+          <html:td>
             <menulist wsm_persist="true" id="server.socketType"
                       oncommand="secureSelect();" style="width:100%;">
               <menupopup id="server.socketTypePopup">
                 <menuitem value="0" label="&connectionSecurityType-0.label;"/>
                 <menuitem id="connectionSecurityType-1"
                           value="1" label="&connectionSecurityType-1.label;"
                           disabled="true"/>
                 <menuitem value="2" label="&connectionSecurityType-2.label;"
@@ -120,17 +122,17 @@
         </html:tr>
         <html:tr>
           <html:td>
             <label value="&authMethod.label;"
                    accesskey="&authMethod.accesskey;"
                    control="server.authMethod"
                    hidefor="nntp,movemail"/>
           </html:td>
-          <html:td style="width:100%;">
+          <html:td>
             <menulist id="server.authMethod"
                       wsm_persist="true"
                       preftype="int"
                       prefstring="mail.server.%serverkey%.authMethod"
                       hidefor="nntp,movemail"
                       style="width:100%;">
               <menupopup id="server.authMethodPopup">
                 <menuitem id="authMethod-no" value="1"/>
@@ -242,16 +244,18 @@
 
     </hbox>
     </vbox>
     <!-- IMAP -->
     <label hidden="true" wsm_persist="true" id="imap.trashFolderName"
                   prefattribute="value"
                   prefstring="mail.server.%serverkey%.trash_folder_name"/>
 
+    <separator class="thin"/>
+
     <hbox align="center" hidefor="pop3,nntp,movemail">
       <label value="&deleteMessagePrefix.label;" align="start"
              control="imap.deleteModel"/>
     </hbox>
     <vbox>
       <hbox align="center"
             id="imap.deleteModel.box"
             hidefor="pop3,nntp,movemail"
@@ -262,44 +266,40 @@
                     prefstring="mail.server.%serverkey%.delete_model">
           <hbox class="specialFolderPickerGrid">
             <vbox>
               <hbox flex="1" align="center">
                 <radio id="modelMoveToTrash"
                        value="1"
                        label="&modelMoveToTrash.label;"
                        accesskey="&modelMoveToTrash.accesskey;"/>
+                <menulist id="msgTrashFolderPicker"
+                          class="folderMenuItem"
+                          style="max-width:300px;" flex="1" crop="center"
+                          aria-labelledby="modelMoveToTrash"
+                          displayformat="verbose">
+                  <menupopup is="folder-menupopup" id="msgTrashFolderPopup"
+                             mode="filing"
+                             showFileHereLabel="true"
+                             oncommand="folderPickerChange(event);"/>
+                </menulist>
               </hbox>
               <hbox flex="1" align="center">
                 <radio id="modelMarkDeleted"
                        value="0"
                        label="&modelMarkDeleted.label;"
                        accesskey="&modelMarkDeleted.accesskey;"/>
               </hbox>
               <hbox flex="1" align="center">
                 <radio id="modelDeleteImmediately"
                        value="2"
                        label="&modelDeleteImmediately.label;"
                        accesskey="&modelDeleteImmediately.accesskey;"/>
               </hbox>
             </vbox>
-            <vbox>
-              <hbox>
-                <menulist id="msgTrashFolderPicker"
-                          class="folderMenuItem"
-                          style="max-width:300px;" flex="1" crop="center"
-                          aria-labelledby="modelMoveToTrash"
-                          displayformat="verbose">
-                  <menupopup is="folder-menupopup" id="msgTrashFolderPopup"
-                             mode="filing"
-                             showFileHereLabel="true"
-                             oncommand="folderPickerChange(event);"/>
-                </menulist>
-              </hbox>
-            </vbox>
           </hbox>
         </radiogroup>
       </hbox>
       <hbox pack="end">
         <!-- This button should have identical attributes to the
              server.popAdvancedButton except the hidefor attribute. -->
         <button label="&advancedButton.label;"
                 accesskey="&advancedButton.accesskey;"
@@ -393,65 +393,65 @@
                       label="&mboxStore2.label;"/>
             <menuitem id="server.maildirStore"
                       value="@mozilla.org/msgstore/maildirstore;1"
                       label="&maildirStore.label;"/>
           </menupopup>
         </menulist>
       </hbox>
 
-      <vbox hidefor="imap,pop3,movemail">
-        <label id="nntp.newsrcFilePath.label" value="&newsrcFilePath.label;"
+      <hbox align="center" hidefor="imap,pop3,movemail">
+        <label id="nntp.newsrcFilePath.label" value="&newsrcFilePath1.label;"
                control="nntp.newsrcFilePath"/>
-        <hbox align="center" class="input-container">
+        <hbox class="input-container" flex="1">
           <html:input id="nntp.newsrcFilePath"
                       type="text"
                       readonly="readonly"
                       wsm_persist="true"
                       datatype="nsIFile"
                       prefstring="mail.server.%serverkey%.newsrc.file"
                       class="uri-element input-inline"
                       aria-labelledby="nntp.newsrcFilePath.label"/>
-          <button id="browseForNewsrc"
-                  label="&browseNewsrc.label;"
-                  filepickertitle="&newsrcPicker.label;"
-                  accesskey="&browseNewsrc.accesskey;"
-                  oncommand="BrowseForNewsrc();"/>
         </hbox>
-      </vbox>
+        <button id="browseForNewsrc"
+                label="&browseNewsrc.label;"
+                filepickertitle="&newsrcPicker1.label;"
+                accesskey="&browseNewsrc.accesskey;"
+                oncommand="BrowseForNewsrc();"/>
+      </hbox>
 
       <separator class="thin"/>
 
-      <vbox>
-      <label id="server.localPath.label" value="&localPath.label;"
-             control="server.localPath"/>
-        <hbox align="center" class="input-container">
+      <hbox align="center">
+        <label id="server.localPath.label" value="&localPath1.label;"
+               control="server.localPath"/>
+        <hbox class="input-container" flex="1">
           <html:input id="server.localPath"
                       type="text"
                       readonly="readonly"
                       wsm_persist="true"
                       datatype="nsIFile"
                       prefstring="mail.server.%serverkey%.directory"
                       class="uri-element input-inline"
                       aria-labelledby="server.localPath.label"/>
-          <button id="browseForLocalFolder"
-                  label="&browseFolder.label;"
-                  filepickertitle="&localFolderPicker.label;"
-                  accesskey="&browseFolder.accesskey;"
-                  oncommand="BrowseForLocalFolders();"/>
         </hbox>
-      </vbox>
+        <button id="browseForLocalFolder"
+                label="&browseFolder.label;"
+                filepickertitle="&localFolderPicker.label;"
+                accesskey="&browseFolder.accesskey;"
+                oncommand="BrowseForLocalFolders();"/>
+      </hbox>
 
     </html:fieldset>
 
     <hbox hidefor="imap,pop3,movemail" align="center" valign="middle" iscontrolcontainer="true">
 
     <separator class="thin"/>
       <label value="&serverDefaultCharset2.label;" control="nntp.charset"/>
       <menulist is="menulist-charsetpicker-viewing" id="nntp.charset"
                 hidable="true"
                 hidefor="imap,pop3,movemail"
                 wsm_persist="true"
                 preftype="string"
                 prefstring="mail.server.%serverkey%.charset"/>
     </hbox>
-  </vbox>
+  </vbox></vbox>
 </window>
--- a/mailnews/base/prefs/content/am-serverwithnoidentities.xhtml
+++ b/mailnews/base/prefs/content/am-serverwithnoidentities.xhtml
@@ -14,21 +14,23 @@
         title="&accountTitle.label;"
         onload="parent.onPanelLoaded('am-serverwithnoidentities.xhtml');">
 
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://global/content/editMenuOverlay.js"/>
   <script src="chrome://messenger/content/am-serverwithnoidentities.js"/>
   <script src="chrome://messenger/content/amUtils.js"/>
 
-  <vbox>
+ <vbox flex="1" style="overflow: auto;"><vbox id="containerBox" flex="1">
   <hbox class="dialogheader">
     <label class="dialogheader-title" value="&accountTitle.label;"/>
   </hbox>
 
+  <separator class="thin"/>
+
   <label hidden="true"
          wsm_persist="true"
          preftype="string"
          prefattribute="value"
          prefstring="mail.server.%serverkey%.storeContractID"
          genericattr="true"
          id="server.storeContractID"/>
 
@@ -71,27 +73,29 @@
                       label="&maildirStore.label;"/>
           </menupopup>
         </menulist>
       </hbox>
     </vbox>
 
     <separator class="thin"/>
 
-    <label id="server.localPath.label" value="&localPath.label;"
-           control="server.localPath"/>
-    <hbox align="center" class="input-container">
-      <html:input id="server.localPath"
-                  type="text"
-                  readonly="readonly"
-                  wsm_persist="true"
-                  datatype="nsIFile"
-                  prefstring="mail.server.%serverkey%.directory"
-                  class="uri-element input-inline"
-                  aria-labelledby="server.localPath.label"/>
-      <button id="browseForLocalFolder" label="&browseFolder.label;"
-              filepickertitle="&localFolderPicker.label;"
-              accesskey="&browseFolder.accesskey;"
-              oncommand="BrowseForLocalFolders()"/>
+    <hbox align="center">
+      <label id="server.localPath.label" value="&localPath1.label;"
+             control="server.localPath"/>
+      <hbox class="input-container" flex="1">
+        <html:input id="server.localPath"
+                    type="text"
+                    readonly="readonly"
+                    wsm_persist="true"
+                    datatype="nsIFile"
+                    prefstring="mail.server.%serverkey%.directory"
+                    class="uri-element input-inline"
+                    aria-labelledby="server.localPath.label"/>
+      </hbox>
+        <button id="browseForLocalFolder" label="&browseFolder.label;"
+                filepickertitle="&localFolderPicker.label;"
+                accesskey="&browseFolder.accesskey;"
+                oncommand="BrowseForLocalFolders()"/>
     </hbox>
   </html:fieldset>
-  </vbox>
+  </vbox></vbox>
 </window>
--- a/mailnews/base/prefs/content/am-smtp.xhtml
+++ b/mailnews/base/prefs/content/am-smtp.xhtml
@@ -14,21 +14,22 @@
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://global/content/editMenuOverlay.js"/>
   <script src="chrome://messenger/content/amUtils.js"/>
   <script src="chrome://messenger/content/am-smtp.js"/>
 
   <stringbundle id="bundle_messenger"
                 src="chrome://messenger/locale/messenger.properties"/>
 
-  <vbox flex="1" style="overflow: auto;">
+  <vbox flex="1" style="overflow: auto;"><vbox id="containerBox" flex="1">
     <hbox class="dialogheader">
       <label class="dialogheader-title" value="&smtpServer.label;"/>
     </hbox>
 
+    <separator class="thin"/>
     <label control="smtpList">&smtpDescription.label;</label>
     <separator class="thin"/>
 
     <hbox flex="1">
       <richlistbox id="smtpList"
                    onselect="gSmtpServerListWindow.onSelectionChanged(event);"
                    ondblclick="gSmtpServerListWindow.onEditServer(event);"
                    seltype="single"
@@ -117,10 +118,10 @@
                           class="plain"
                           aria-labelledby="connectionSecurityLabel"/>
             </hbox>
           </vbox>
         </hbox>
       </stack>
     </hbox>
     <separator flex="1"/>
-  </vbox>
+  </vbox></vbox>
 </window>
--- a/mailnews/extensions/mdn/content/am-mdn.xhtml
+++ b/mailnews/extensions/mdn/content/am-mdn.xhtml
@@ -9,28 +9,29 @@
 <?xml-stylesheet href="chrome://messenger/skin/accountManage.css" type="text/css"?>
 
 <!DOCTYPE window SYSTEM "chrome://messenger/locale/am-mdn.dtd">
 
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
         title="&pane.title;"
         onload="parent.onPanelLoaded('am-mdn.xhtml');">
 
-  <vbox flex="1" style="overflow: auto;">
+  <vbox flex="1" style="overflow: auto;"><vbox id="containerBox" flex="1">
     <stringbundle id="bundle_smime" src="chrome://messenger/locale/am-mdn.properties"/>
     <script src="chrome://messenger/content/AccountManager.js"/>
     <script src="chrome://messenger/content/amUtils.js"/>
     <script src="chrome://messenger/content/am-mdn.js"/>
 
     <hbox class="dialogheader">
       <label class="dialogheader-title" value="&pane.title;"/>
     </hbox>
 
+    <separator class="thin"/>
+
     <html:fieldset>
-      <html:legend>&pane.title;</html:legend>
 
       <hbox id="prefChoices" align="center" flex="1">
         <radiogroup id="identity.use_custom_prefs" wsm_persist="true" genericattr="true"
                     preftype="bool" prefstring="mail.identity.%identitykey%.use_custom_prefs"
                     oncommand="EnableDisableCustomSettings();" flex="1">
           <radio id="identity.select_global_prefs"
                  value="false"
                  label="&useGlobalPrefs.label;"
@@ -123,11 +124,11 @@
                   </menupopup>
                 </menulist>
               </vbox>
             </hbox>
           </radiogroup>
         </vbox>
       </vbox>
     </html:fieldset>
-  </vbox>
+  </vbox></vbox>
 
 </window>
--- a/mailnews/extensions/newsblog/content/am-newsblog.xhtml
+++ b/mailnews/extensions/newsblog/content/am-newsblog.xhtml
@@ -25,17 +25,17 @@
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://global/content/editMenuOverlay.js"/>
   <script src="chrome://messenger/content/AccountManager.js"/>
   <script src="chrome://messenger-newsblog/content/am-newsblog.js"/>
   <script src="chrome://messenger-newsblog/content/newsblogOverlay.js"/>
   <script src="chrome://messenger/content/amUtils.js"/>
   <script src="chrome://messenger/content/am-prefs.js"/>
 
-  <vbox flex="1" style="overflow: auto;">
+  <vbox flex="1" style="overflow: auto;"><vbox id="containerBox" flex="1">
 
     <hbox id="am-newsblog-title" class="dialogheader">
       <label class="dialogheader-title" defaultTitle="&accountTitle.label;"/>
     </hbox>
 
     <description class="secDesc">&accountSettingsDesc.label;</description>
 
     <hbox align="center">
@@ -106,21 +106,20 @@
                       aria-labelledby="autotagUsePrefix"
                       placeholder="&autoTagPrefix.placeholder;"
                       onchange="setPrefs(this)"/>
       </hbox>
     </html:fieldset>
 
     <separator class="thin"/>
 
-    <hbox align="center">
+    <hbox pack="end">
       <button label="&manageSubscriptions.label;"
               accesskey="&manageSubscriptions.accesskey;"
               oncommand="openSubscriptionsDialog(gAccount.incomingServer.rootFolder);"/>
-      <spacer flex="1"/>
     </hbox>
 
     <separator class="thin"/>
 
     <html:fieldset>
       <html:legend>&messageStorage.label;</html:legend>
 
       <checkbox id="server.emptyTrashOnExit"
@@ -128,27 +127,29 @@
                 label="&emptyTrashOnExit.label;"
                 accesskey="&emptyTrashOnExit.accesskey;"
                 prefattribute="value"
                 prefstring="mail.server.%serverkey%.empty_trash_on_exit"/>
 
       <separator class="thin"/>
 
       <vbox>
-        <label id="server.localPathLabel" value="&localPath.label;" control="server.localPath"/>
-        <hbox align="center" class="input-container">
-          <html:input id="server.localPath" type="text" readonly="readonly"
-                      class="uri-element input-inline"
-                      aria-labelledby="server.localPathLabel"
-                      wsm_persist="true"
-                      datatype="nsIFile"
-                      prefstring="mail.server.%serverkey%.directory"/>
+        <hbox align="center">
+          <label id="server.localPathLabel" value="&localPath1.label;" control="server.localPath"/>
+          <hbox class="input-container" flex="1">
+            <html:input id="server.localPath" type="text" readonly="readonly"
+                        class="uri-element input-inline"
+                        aria-labelledby="server.localPathLabel"
+                        wsm_persist="true"
+                        datatype="nsIFile"
+                        prefstring="mail.server.%serverkey%.directory"/>
+          </hbox>
           <button id="browseForLocalFolder"
                   label="&browseFolder.label;"
                   filepickertitle="&localFolderPicker.label;"
                   accesskey="&browseFolder.accesskey;"
                   oncommand="BrowseForLocalFolders();"/>
         </hbox>
       </vbox>
 
     </html:fieldset>
-  </vbox>
+  </vbox></vbox>
 </window>