I have tried vTicker but it does not work as an inline element.
<h1>
<div id="vticker"><ul>...</ul></div>
Some other headline text
</h1>
I would like the vertically scrolling text inside the vTicker
object to align with the other content in the h1
tag, but when I try to make it inline
or inline-block
it disappears.
I tried making my own as well, but can't seem to move elements located inside an inline
or inline-block
object with absolute
, relative
, or margin
positioning.
Just setting the element you run vTicker on to be
display: inline
won't work, because vTicker uses absolute positioning andoverflow: hidden
to do its magic.Using
display: inline-block
comes closer, but suffers from the fact that the vTicker container does not have a width. Thus, it won't display anything.We can fix this by setting the width of the vTicker container to the width of the widest element in it, or, equivalently, the width of the
ul
in the vTicker container. Demo: