diff --git a/lib/LaTeXML/Engine/plain.pool.ltxml b/lib/LaTeXML/Engine/plain.pool.ltxml
index afa62213c..2a9044e48 100644
--- a/lib/LaTeXML/Engine/plain.pool.ltxml
+++ b/lib/LaTeXML/Engine/plain.pool.ltxml
@@ -536,9 +536,8 @@ DefConstructor('\ltx@centerline{}', sub {
alias => '\centerline',
bounded => 1);
-# These should be 0 width, but perhaps also shifted?
-DefMacro('\llap{}', '\hbox to 0pt{\hss#1}');
-DefMacro('\rlap{}', '\hbox to 0pt{#1\hss}');
+DefMacro('\llap{}', '\hbox{\@ADDCLASS{ltx_llap}#1}');
+DefMacro('\rlap{}', '\hbox{\@ADDCLASS{ltx_rlap}#1}');
DefMacroI('\m@th', undef, '\mathsurround=0pt ');
diff --git a/lib/LaTeXML/resources/CSS/LaTeXML.css b/lib/LaTeXML/resources/CSS/LaTeXML.css
index b954b01b1..4998d0e9d 100644
--- a/lib/LaTeXML/resources/CSS/LaTeXML.css
+++ b/lib/LaTeXML/resources/CSS/LaTeXML.css
@@ -510,3 +510,9 @@ cite { font-style: normal; }
.ltx_overlay {position:relative; }
.ltx_overlay > span:nth-child(2) {position:absolute; left:0; }
+
+/* \llap, \rlap */
+.ltx__lap_container {
+ display:inline-block; vertical-align:bottom; width:0pt; white-space:nowrap; /* width 0pt causes extreme wrapping otherwise */ }
+.ltx__lap_container>.ltx_llap { float:right; }
+.ltx__lap_container>.ltx_rlap { float:left; }
diff --git a/lib/LaTeXML/resources/XSLT/LaTeXML-inline-xhtml.xsl b/lib/LaTeXML/resources/XSLT/LaTeXML-inline-xhtml.xsl
index 122c5a3ab..295c0b118 100644
--- a/lib/LaTeXML/resources/XSLT/LaTeXML-inline-xhtml.xsl
+++ b/lib/LaTeXML/resources/XSLT/LaTeXML-inline-xhtml.xsl
@@ -33,22 +33,41 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ltx__lap_container
+
+
+
+
+
+ ltx__lap_container
+
+
+
+
+
+
+