.content { display: block; padding: 0.2em; overflow: hidden; margin: 0 auto; } .container1 { width: 100%; float: left; display: inline-block; overflow: hidden; box-sizing: border-box; height: 45px; position: relative; cursor: pointer; } .marquee-sibling { padding: 0; background: rgb(195, 38, 43); width: 15%; height: 45px; line-height: 42px; font-size: 14px; font-weight: bold; color: #FFF; text-align: center; float:right; right: 0; z-index: 2000; } .marquee, *[class^="marquee"] { display: inline-block; white-space: nowrap; position:absolute; } .marquee{ margin-right: 25%; } .marquee-content-items{ display: inline-block; padding: 5px; margin: 0; height: 45px; position: relative; } .marquee-content-items li{ display: inline-block; line-height: 35px; color: #FFF; } .marquee-content-items li:after{ content: "|"; margin: 0 1em; }