diff --git a/reviewboard/diffviewer/templatetags/difftags.py b/reviewboard/diffviewer/templatetags/difftags.py
index 216199402ff29f98bb2d3fc4df03046abeb6c09f..415748b5c1db7cf71b438d22f0d3e50839b4e7be 100644
--- a/reviewboard/diffviewer/templatetags/difftags.py
+++ b/reviewboard/diffviewer/templatetags/difftags.py
@@ -251,6 +251,7 @@ def diff_lines(file, chunk, standalone, line_fmt, anchor_fmt,
         moved_from = {}
         moved_to = {}
         is_moved_row = False
+        is_first_moved_row = False
 
         if len(line) > 8 and isinstance(line[8], dict):
             moved_info = line[8]
@@ -263,6 +264,7 @@ def diff_lines(file, chunk, standalone, line_fmt, anchor_fmt,
 
                 if moved_from_first:
                     # This is the start of a new move range.
+                    is_first_moved_row = True
                     cell_2_classes.append('moved-from-start')
                     moved_from = {
                         'class': 'moved-flag',
@@ -279,6 +281,7 @@ def diff_lines(file, chunk, standalone, line_fmt, anchor_fmt,
 
                 if moved_to_first:
                     # This is the start of a new move range.
+                    is_first_moved_row = True
                     cell_1_classes.append('moved-to-start')
                     moved_to = {
                         'class': 'moved-flag',
@@ -290,6 +293,9 @@ def diff_lines(file, chunk, standalone, line_fmt, anchor_fmt,
         if is_moved_row:
             row_classes.append('moved-row')
 
+        if is_first_moved_row:
+            row_classes.append('moved-row-start')
+
         if row_classes:
             row_class_attr = ' class="%s"' % ' '.join(row_classes)
 
diff --git a/reviewboard/static/rb/css/diffviewer.less b/reviewboard/static/rb/css/diffviewer.less
index a46c8e3c7e4eb15f3d3182e609dab1da28ab8fb4..93875685f6da7a61b4ea74997b1bc09f24a29d26 100644
--- a/reviewboard/static/rb/css/diffviewer.less
+++ b/reviewboard/static/rb/css/diffviewer.less
@@ -114,11 +114,9 @@
     color: #DDCCCC;
   }
 
-  .replace {
-    .moved-to, .moved-from {
-      pre {
-        margin-top: 6px;
-      }
+  .moved-row-start {
+    pre {
+      margin-top: 4px;
     }
   }
 
