# Add a horizontal scrollbar to MathJax formula blocks

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.

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 */
}


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

## 1 Answer

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

• 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