user915210
user915210

Reputation:

marquee should start from the middle?

I am using marquee to show the dashboard on my site, the marquee tag is written as:

<marquee loop="infinite" behavior="scroll" direction="up" scrollamount="1" height="500" width="500">
    .............
    .............
</marquee>

As you can see the marquee contents are scrolling from down to up.

Problem

When I hit the URL from browser, the place where marquee is used look empty and then the marquee content start coming from the bottom.

What I want is the marquee content should start from the middle rather than from the bottom.

Upvotes: 11

Views: 38218

Answers (5)

RFerreira
RFerreira

Reputation: 68

In this case. Just set the style margin-top:-500px (-height_of_marquee) of the element wrapped by marquee should work.

Upvotes: 0

Ravisanath
Ravisanath

Reputation: 1

So when ever you use this code

<marquee loop="infinite" behavior="scroll" direction="up" scrollamount="1" height="500" width="500">
    .............
    .............
</marquee>

for the first block add style="margin-top:-value" so that it will starts from the middle.

Upvotes: -1

shazeerazly
shazeerazly

Reputation: 11

This stops in the middle and starts at the middle:

<marquee BEHAVIOR="alternate" SCROLLAMOUNT="6" DIRECTION="down">

Upvotes: 1

st mnmn
st mnmn

Reputation: 3667

if you will change the attribute height of the marqee tag to 100 or something like this it wont start from the buttom

Upvotes: -1

Mr Lister
Mr Lister

Reputation: 46589

The <marquee> element does not have this functionality. There are some proposals to create marquees with CSS3, but those are far from definitive.

So the only real alternative is to write one in javascript.

Upvotes: 4

Related Questions