Marquee text appears in multiple lines

user16948 picture user16948 · Feb 1, 2012 · Viewed 20.8k times · Source

I have the following code:

<marquee><p>{a long text}</p></marquee>

The text within the marquee appears in multiple lines in webkit browsers. How do I force it to appear in one line? removing the <p> tag solves the problem but I want to know if there is a way rather than removing the <p> tag.

Answer

user191966 picture user191966 · Feb 1, 2012
marquee p
{
    white-space:nowrap;
}