Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Marquee Overflow


Question

Posted (edited)

Hi,

I'm having trouble with a rotating text marquee on my site. I've successfully managed to put the marquee in using a code block, however I have site overflow and not sure how to fix it. I've tried fiddling the max width but no luck. Any help would be much appreciated.

HTML:

<h3>
<div class="marquee">
  <div class="track">
    <div class="content">&nbsp;SEO • MARKETING • WEB DESIGN • SOCIAL MEDIA MANAGEMENT • CONTENT CREATION • EMAIL • WEB DEV • PHOTOGRAPHY • VIDEO • SEO • MARKETING • WEB DESIGN • SOCIAL MEDIA MANAGEMENT • CONTENT CREATION • EMAIL • WEB DEV • PHOTOGRAPHY • VIDEO</div>

CSS:

//MARQUEE START//
.marquee {
  position: center;
  width: 150vw;
  max-width: none;
  height: 40px;
  padding-top: 3px !important;
  overflow-x: hidden;
}

.track {
  position: absolute;
  white-space: nowrap;
  will-change: transform;
  animation: marquee 32s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
//MARQUEE END//

Screen Shot 2021-06-08 at 8.57.49 am.png

Edited by Jordy_TheShop
Link to comment
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

2 answers to this question

Recommended Posts

  • 0

 

Yes I did – I ended up noodling around and the following CSS worked for anyone else needing this effect. 

 

//MARQUEE START//
.marquee {
  position: relative;
  width: 100vw;
  max-width: 100%;
  height: 40px;
  padding-top: 0px !important;
  overflow: hidden;
}

.track {
  position: absolute;
  white-space: nowrap;
  will-change: transform;
  animation: marquee 32s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
//MARQUEE END//

 

Thanks,

Jordy 🙂

Link to comment
  • 1

Hi. It looks like you solved this?

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care - Learn CSS - Custom Popup - Testimonial Slider

I'm Tuan, blogger/owner of a free library for children in Vietnam. Helping the community is a hobby. Contact me via email.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...