Zane Posted March 2, 2012 Share Posted March 2, 2012 I know it's possible somehow to stretch a gradient 100% vertically. I just can't figure out how to do it. Suppose I have my div#nav div#nav { height: 100%; width: 200px; background-color: black; background-color: #8C9AA3; /// What am I doing wrong? background: url(gradient.jpg) 100%; /// I need this gradient to span from top to bottom. font-family:"Arial"; margin: 0px; padding: 0px; padding-top: 0px; font-weight: bold; position:fixed; color:white; } Here's the gradient.. http://reallycheapfloors.com/gradient.jpg This is possible right? Quote Link to comment https://forums.phpfreaks.com/topic/258113-background-image-stretching/ Share on other sites More sharing options...
Zane Posted March 2, 2012 Author Share Posted March 2, 2012 aha.. I got it! background-size: 100% 100% I don't understand why both width and height have to be 100%, but oh well, it works. Quote Link to comment https://forums.phpfreaks.com/topic/258113-background-image-stretching/#findComment-1323119 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.