Search code examples
htmlmarquee

Marquee text appears in multiple lines


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.


Solution

  • marquee p
    {
        white-space:nowrap;
    }