# CSS that can be used to replace the marquee tag

**URL:** <https://forum.pinegrow.com/t/css-that-can-be-used-to-replace-the-marquee-tag/5104>\
**Category:** General\
**Created:** [March 13, 2021, 8:27pm UTC](https://forum.pinegrow.com/t/css-that-can-be-used-to-replace-the-marquee-tag/5104 "2021-03-13T20:27:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![randyrie](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/randyrie/32/2103_2.png) [@randyrie](https://forum.pinegrow.com/u/randyrie)\
**Post date:** [March 13, 2021, 8:27pm UTC](https://forum.pinegrow.com/t/css-that-can-be-used-to-replace-the-marquee-tag/5104/1 "2021-03-13T20:27:50Z")

</div>

I see that some browsers are deprecating the ‘marquee’ tag. Any suggestions for what would be a good replacement for it (CSS, jQuery, JavaScript)?

---

<div class="post-metadata">

**Author:** ![schpengle](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/schpengle/32/238_2.png) [@schpengle](https://forum.pinegrow.com/u/schpengle)\
**Post date:** [March 13, 2021, 9:06pm UTC](https://forum.pinegrow.com/t/css-that-can-be-used-to-replace-the-marquee-tag/5104/2 "2021-03-13T21:06:58Z")

</div>

> **[How to Add the Marquee Effect without Using the Marquee Tag (with CSS,...](https://www.w3docs.com/snippets/css/how-to-have-the-marquee-effect-without-using-the-marquee-tag-with-css-javascript-and-jquery.html)**
>
> Learn the alternative ways of having continually scrolling text without using the obsolete tag. See examples with CSS animations, JavaScript and jQuery.

---

<div class="post-metadata">

**Author:** ![randyrie](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/randyrie/32/2103_2.png) [@randyrie](https://forum.pinegrow.com/u/randyrie)\
**Post date:** [March 14, 2021, 12:46am UTC](https://forum.pinegrow.com/t/css-that-can-be-used-to-replace-the-marquee-tag/5104/3 "2021-03-14T00:46:29Z")

</div>

Thanks, @schpengle …

I also found this on [W3docs.com](http://W3docs.com) and started to use it but the idea of replacing a simple HTML tag with a plethora of coding just doesn’t make any sense. So I decided to use the marquee tag and grumble about the direction web development is going (over the cliff with the rest of the lemmings) until the new _PG Interactions_ eventually addresses this or a far simpler CSS solution is adopted.

(Always looking for the easy way out…) 🧐

---

<div class="post-metadata">

**Author:** ![schpengle](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/schpengle/32/238_2.png) [@schpengle](https://forum.pinegrow.com/u/schpengle)\
**Post date:** [March 14, 2021, 12:48am UTC](https://forum.pinegrow.com/t/css-that-can-be-used-to-replace-the-marquee-tag/5104/4 "2021-03-14T00:48:08Z")

</div>

It is a bit excessive

…compared to one element tag.

I think the idea is just not to use that _sort of thing_ anymore.  
so its not meant to be easy to emmulate.

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [March 14, 2021, 10:23am UTC](https://forum.pinegrow.com/t/css-that-can-be-used-to-replace-the-marquee-tag/5104/5 "2021-03-14T10:23:40Z")

</div>

@randyrie,  
I think that the first solution on the page that @schpengle linked is pretty good.You don’t even need all the prefixing these days - native support in about 95% of browsers

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/f/fd588fa7343747795a395b7842fd7c1df53b7d98.png)  
So:

```auto
.text-for-marquee {
    animation: marquee 10s linear infinite;
}

@keyframes marquee {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

```

However, if you _want_ an Interactions solution. Add some text to the page (I used an H3 element) then add an interaction

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/c/c88f8b6195ec68867e01e5402c2bd8e9790c0eda.png)  
For the animation, add a transform X - set it to off screen first at 100% then tween to -100%  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/3/3ba0a9f8303f319b6b7e08c03326d625c50045a7.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/f/f26434afa57a45ce0c2a0913bf2901069c5f01a7.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/c/c24cf956edd4d59e32b3c3996484b57c204b0007.png)

Cheers,  
Bob
