Jump to content

Gradient color


xmlxpert
 Share

Recommended Posts

I don't think it's in CSS's power to make a gradient. At least, not without the usage of an image though. There was some kind of Microsoft filter for that, but (considering it's Microsoft's idea, not a W3C standart) it's avaiable only for IE.There might be a JavaScript for this though. I don't know.

Link to comment
Share on other sites

Hi,  Is there anyway that I could use a gradient color from using this code?<code>div.container{width:100%;margin:0px;border:1px solid #CCCCCC; /*this isnt a gradient color, how do I replace this*/line-height:120%;}</code>

I'm afraid the CSS has no power to make a gradient. Like boen_robot says you can make a gradient but only using image as a repeated background.Here's a CSS editor you can use: Top Style LiteYou can use: .h_gradient {background-image: http://www.domain.com/image.jpg;background-repeat: repeat-x;}for horizontal gradient or.v_gradient {background-image: http://www.domain.com/image.jpg;background-repeat: repeat-y;}for vertical gradientGo to this page and find how you can make gradient using JavaScript and DHTMLGood luck :)
Link to comment
Share on other sites

i was just wandering about this, actually. i guess i'll just use the graphical way out. any clue if this could be in a future version of CSS, though?

Link to comment
Share on other sites

i was just wandering about this, actually. i guess i'll just use the graphical way out. any clue if this could be in a future version of CSS, though?

I don't think so. At least not in CSS3 I think. I'm not sure though.
Link to comment
Share on other sites

This is definitly a lengthy work around, just take a look at ithttp://www.designdetector.com/2005/09/css-gradients-demo.php

Holy Stuff that's some crazy coding! that guy is really inventive. I have to say, a gradient background is probably one of the only cases in which I would rather use an image than the code... it might actually take less space and bandwidth!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...