MathJax formula blocks (i.e. $$these$$, not single-dollar-sign $inline$ mathjax) sometimes get wide, especially when they're arrays. Wide formulae don't play nicely with the responsive design though and instead overflow into the sidebar if the window is narrow enough.

a big mathjax table that's illegible because it's overlapping with the hot network questions list

Could MathJax formulae get a horizontal scrollbar?

If I add the following CSS we get this pretty scrollbar exclusively while the viewport is narrow enough like above:

.math-container {
  overflow-x: auto;
  display: block; /* or use a <div> instead of a span */

the same big mathjax table, but it's scrolled instead of overlapping the HNQ

Then we can also scroll to see the rest of the table, and it's legible because it's not overlapping with the sidebar!

scrolled over to see the rest of the table


A fix for this is now live. Mathjax tables should now get a horizontal scrollbar when they overflow their assigned width.

| improve this answer | |
  • Thanks! One niggle, though, is that the scroll-bar doesn't appear till you click on the image: usually it's evident that an expression's been truncated, but not always. – Scortchi - Reinstate Monica Jan 10 at 1:38
  • @Scortchi-ReinstateMonica That sounds like it might be a platform issue. For example, Mac and iOS likes to hide scrollbars by default, and only shows that they're there when you start to interact with the thing that's scrollable. (There's things SO could do to help with that, but forcing the scrollbars to show up would be out of their hands.) – doppelgreener Aug 1 at 13:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .