xmlxpert Posted February 22, 2006 Share Posted February 22, 2006 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> Link to comment Share on other sites More sharing options...
Aphotic Posted February 22, 2006 Share Posted February 22, 2006 You want a gradient border? Link to comment Share on other sites More sharing options...
xmlxpert Posted February 22, 2006 Author Share Posted February 22, 2006 You want a gradient border?<{POST_SNAPBACK}> yes i would like that, thanks Link to comment Share on other sites More sharing options...
boen_robot Posted February 22, 2006 Share Posted February 22, 2006 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 More sharing options...
pmdesign Posted February 22, 2006 Share Posted February 22, 2006 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><{POST_SNAPBACK}> 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 More sharing options...
mpoer Posted February 22, 2006 Share Posted February 22, 2006 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 More sharing options...
boen_robot Posted February 22, 2006 Share Posted February 22, 2006 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 More sharing options...
Aphotic Posted February 22, 2006 Share Posted February 22, 2006 I think that it may be a possibility. But like boen_robot said, not in CSS3. Maybe in CSS4, as long as we complain enough . Link to comment Share on other sites More sharing options...
pulpfiction Posted February 22, 2006 Share Posted February 22, 2006 This is definitly a lengthy work around, just take a look at ithttp://www.designdetector.com/2005/09/css-gradients-demo.php Link to comment Share on other sites More sharing options...
mpoer Posted February 22, 2006 Share Posted February 22, 2006 This is definitly a lengthy work around, just take a look at ithttp://www.designdetector.com/2005/09/css-gradients-demo.php<{POST_SNAPBACK}> 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 More sharing options...
Aphotic Posted February 23, 2006 Share Posted February 23, 2006 That's the way it looks. But maybe they'll decide gradient is good for design and through it in, in future releases, that is. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now