1) Script Title: gradient image
2) Script URL (on DD): http://tools.dynamicdrive.com/gradient/
3) Describe problem:
How do I turn my bg color to look like a gradient image? I want the background color of my rss scroller to be like a gradient color.
1) Script Title: gradient image
2) Script URL (on DD): http://tools.dynamicdrive.com/gradient/
3) Describe problem:
How do I turn my bg color to look like a gradient image? I want the background color of my rss scroller to be like a gradient color.
It depends on the dimensions of the RSS scroller, but assuming it's long in width and shorter in height, you'd want to tile the gradient background image horizontally. Using global CSS, something like:
The gradient image is assumed to be a slim and tall image, for example, 5px width by 300px height.Code:#rssdivid{ background: white url(gradient.jpg) top left repeat-x; }
Thank you looks simple enough and yes its wide and short. But do I have to remove any of the script that deals with the back ground from the original before I insert your suggestion?
It depends on which script exactly you're talking about...
the script that sets up the scroller box that comes with the demo.
*Example CSS for the two demo scrollers*/
#pscroller1{
width: auto;
height: 100px;
border: 1px solid black;
padding: 5px;
background-color:lightsteelblue;
}
.rssclass .rsstitle{
font-weight: bold;
}
.rssclass .rssdate{
color: black;
font-size: 85%;
}
.rssclass a{
text-decoration: none;
}
</style>
Inside #pscroller1, you'd have something like:
Code:#pscroller1{ width: auto; height: 100px; border: 1px solid black; padding: 5px; background: white url(gradient.jpg) top left repeat-x; }
hmm..unfortunately all that gave me was a white background
Where it says gradient.jpg, it has to be an existing image. You can use the gradient image tool here on DD, or make your own using image creation software. To change the background color if there is no image, simply change the below code in red.
Hope this helps.Code:#pscroller1{ width: auto; height: 100px; border: 1px solid black; padding: 5px; background: white url(gradient.jpg) top left repeat-x; }
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
To recap what thetestingsite is saying, make sure "gradient.jpg" is the correct path to your "gradient.jpg" image on your site. When in doubt, use an absolute URL, for example:
Code:background: white url(http://www.mysite.com/gradient.jpg) top left repeat-x;
Yup I did all those things...made a gradient image using your tools, uploaded to my server, even used the full url to the gradient image I just uploaded but the background of the box was just white(blank).
I will try to make a new gradient image again but I looked at my file (gradient.jpg) and it looks fine.
I do have two scrollers on my page, maybe thats the prob? I only tried adding a gradient image for the first one.
Will try it again soon...
Bookmarks