CSS HELP | Line of text going across like news channels

Hello, I have seen on some sites and portfolio pages where there is a line of text which comes in one side of the screen and goes out of window from other direction. Like it happen on bottom of news channel.

What are those called and any idea about those can be done in CSS.
I kind of have some idea but don’t know completely.
any existing Codepen will be appreciated.
Thanks for reading

You could use CSS animations/transitions to get that to work.

I think they are called tickers.

You would create a div with a fixed height and full width, then have the text inside of it, and set that text to start at margin -1000 or something and move across.

I can’t remember exactly how to do it, but it something along those lines.

Thanks for reply , But actually it will cause some issues i tried it.
Luckily i found the answer and it very simple.

HTML has a tag for this called “marquee” . Instead of putting your text in a <p></p> tag just put it in
<marquee behavior="" direction="">text</marquee>
It also has direction property by which we can make it go in direction left -to-right and up-to-down etc. which saves us from doing all the work in CSS.
Try using it , it good thanks

HTML does not have this, it’s been deprecated for years, the fact that some browsers still support it is just a historical holdover

1 Like