Skip to content

Strange DOM interaction with an <h3> #3231

Answered by edemaine
pgeipi10 asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, this is because of the float hack from the other thread. You'll want to add a clear style to something afterward to end the floats. For example, you could add the following:

h3 { clear: both }

Or more robustly, you could add a "clearfix" to .katex-display:

.katex-display:after {
  content: "";
  display: table;
  clear: both;
}

The latter seems to be failing in your context because you're wrapping every .katex-display with a <div>. It works if you can take them outside the <div> somehow.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@pgeipi10
Comment options

Comment options

You must be logged in to vote
2 replies
@pgeipi10
Comment options

@edemaine
Comment options

Answer selected by pgeipi10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants