Here's one way to modify the markup and get the text within the gradient
area:
<div id="box1" style="height:200px; width:200px;">
<div style="position:absolute; padding:10px;
font-family:'trebuchet ms'; font-size:12px; color:white;">
This is the text in my gradient box!
</div>
</div>
This will certainly save a lot of time creating background images!
Rick
Rick Faircloth wrote:
Thanks, weepy...
When you said it "creates graduated backgrounds" I assumed it
would respond like a true background image. Perhaps that's not what
you intended.
Rick
weepy wrote:
Ah Rick - I'll take a look.
On 4 Nov, 14:14, Rick Faircloth <[EMAIL PROTECTED]> wrote:
Hey, I like gradientz very much!
Question... how do I make the gradient to be the background
for a div?
I created a div with a gradient and put the text inside the div, but
the
text
appears outside the gradient, not over it...
<script type="text/javascript">
$(document).ready(function() {
$('#box1').gradientz({
start: "gray",
end: "white", angle: 0
})
});
</script>
<div id="box1" style="height:200px; width:200px; padding:10px;
color:white;">
This is the text in my gradient box!</div>
Rick
weepy wrote:
Just released a jQuery plugin "Gradientz" which creates graduated
backgrounds without the need for images.
* Uses VML in IE and canvas in Firefox, Webkit.
* Cross Browser: Tested on FF3, IE6, IE7, Safari
* Fast
* No need for excanvas
* Small: 2.2k uncompressed
For those of you that have seen Cornerz - it works in a very
similar
way.
See more herehttp://www.parkerfox.co.uk/labs/gradientz/
Enjoy!
weepy ;..(
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG -http://www.avg.com
Version: 8.0.175 / Virus Database: 270.8.6/1765 - Release Date:
11/3/2008 4:59 PM
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus
Database: 270.8.6/1765 - Release Date: 11/3/2008 4:59 PM
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.8.6/1765 - Release Date: 11/3/2008 4:59 PM