Results 1 to 8 of 8

Thread: Text Scroller- colour change?

  1. #1
    Join Date
    Sep 2010
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Text Scroller- colour change?

    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.

  2. #2
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    Code:
    #pscroller2 a{
    text-decoration: none;
    color:#F03;
    }

  3. #3
    Join Date
    Sep 2010
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Align Text

    Thanks it worked.

    One more, how do I align text to center?

  4. #4
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

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

  5. #5
    Join Date
    Sep 2010
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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?

  6. #6
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    can we see a link to your page ?

  7. #7
    Join Date
    Sep 2010
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The page is not live yet. I am only working on it.

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Instead of making each of your scroller contents like for example (from the demo page):

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

    Code:
    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:

    Code:
    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:

    Code:
    .scontent {
    text-align: center;
    }
    You could even add other rules there or use container selectors for items inside these divisions.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •