PDA

View Full Version : Text Scroller- colour change?



mbro
09-07-2010, 06:16 PM
1) Script Title: Pausing up-down Scroller

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/crosstick.htm

3) Describe problem: How do I change the colour of the text? I have changed size, border and it is working perfectly. Except I can't see where I can the change the text colour. I am using the second sample - smaller one line version.

azoomer
09-07-2010, 10:26 PM
#pscroller2 a{
text-decoration: none;
color:#F03;
}

mbro
09-09-2010, 07:20 PM
Thanks it worked.

One more, how do I align text to center?

azoomer
09-09-2010, 07:24 PM
try this


#pscroller2{
width: 350px;
height: 20px;
border: 1px solid black;
padding: 3px;
text-align: center;
}

mbro
09-09-2010, 07:29 PM
Thanks I already tried that and the text seems is centered but is aligned on the very right of the box. Half the text is hidden from view.

Any ideas?

azoomer
09-09-2010, 07:56 PM
can we see a link to your page ?

mbro
09-10-2010, 11:10 AM
The page is not live yet. I am only working on it.

jscheuer1
09-10-2010, 11:40 AM
Instead of making each of your scroller contents like for example (from the demo page):



pausecontent[1]='<a href="http://www.codingforums.com">Coding Forums</a><br />Web coding and development forums.'

Do them like:


pausecontent[1]='<div style="text-align: center;"><a href="http://www.codingforums.com">Coding Forums</a><br />Web coding and development forums.</div>'

or, if you want the flexibility of using a style sheet, and a little less code in each content item:


pausecontent[1]='<div class="scontent"><a href="http://www.codingforums.com">Coding Forums</a><br />Web coding and development forums.</div>'

Then in your stylesheet you can do:


.scontent {
text-align: center;
}

You could even add other rules there or use container selectors for items inside these divisions.