.marquee-container { height: 50px; overflow: hidden; position: relative; } .marquee-container h1 { font-size: 3em; color: #000000; position: absolute; width: 100%; height: 100%; margin: 0; line-height: 50px; text-align: center; /* Starting position */ transform:translateX(100%); /* Apply animation to this element */ animation: move-students 15s linear infinite; } /* Move it (define the animation) */ @keyframes move-students { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }