Results 1 to 4 of 4

Thread: change bg color of a scrollable content text

  1. #1
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default change bg color of a scrollable content text

    I created a scrollable content text box using a tutorial from this site. Here is the link to it http://www.dynamicdrive.com/dynamicindex11/scrollc2.htm

    I would like to change the color of the background of the scrollbar. I know I can change the background of the page but I don;t want that. I just want to change the color of the scroll box. I tried changing the color of the layer but it didn't work( maybe I did something wrong).

    Can someone help me please. Thanks!!!

    Jane

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    You cannot change the color of the scrollbar as it is a picture...or i'm missing something else...
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    It is very simple to change the color of that image, what you do is you open it up in something simple like MS Paint, and use the fill tool or bucket tool.
    Hope this Helps,
    Nile
    Jeremy | jfein.net

  4. #4
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    I think you are looking for a way to give a background color for the section that shows the two scrollers (^ and v). If that is the case then you can try the following thing in the source code of the script. Modify the following section in the original section as I've highlighted here

    Code:
    <table width="175px">
    	<td>
    		<p align="right">
    			<a href="#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)" style="background-color: #ff0000;"><img src="up.gif" border=0></a>  
    			<a href="#" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)" style="background-color: #0651B9;"><img src="down.gif" border=0></a>
    		</p>
    	</td>
    </table>
    Or

    You can have a CSS class or selector on the anchor element in which you can specify a background color.

    Or

    You can try a different approach in which you can put each of the anchor elements inside a <span> element and have a custom CSS class for them in which you can control the presentation of those section in a much more efficient manner. Something like the following:

    Code:
    <table width="175px">
    	<td>
    		<p align="right">
    			<span class="up">
    				<a href="#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)"><img src="up.gif" border=0></a>
    			</span>  
    			<span class="down">
    				<a href="#" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)" ><img src="down.gif" border=0></a>
    			</span>
    		</p>
    	</td>
    </table>
    A skelton of the 'up' and 'down' CSS classes is below:

    Code:
    .up{
    	background-color: #ff0000;
    }
    .down{
    	background-color: #0651B9;
    }

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
  •