Question

I have started using jqMath for equations on my website and I need to be able to wrap these equations when their outer div has a fixed width.

<div id='math'>$$ x={-b±√{b^2-4ac}}/{2a} \text'A little bit of text that goes along with this.' $$</div>

CSS:

#math {
    width: 100px;
}

At the moment jqMath will just continue the text and equations in a long line, I need to make sure that the 'math' div will be a certain width and there will be no scrolling within it.

Any help would be greatly appreciated.

Was it helpful?

Solution

If you want to wrap text, then you can try like this..

<div id="math">
    $$x={-b±√{b^2-4ac}}/{2a}$$ 
    <br />
    $$\text' A little bit of text that goes along with this.'$$
</div>

or simply do this

<div id="math">
    $$x={-b±√{b^2-4ac}}/{2a}$$ 
    <br />
    A little bit of text that goes along with this.
</div>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top