twilitegxa Posted April 3, 2011 Share Posted April 3, 2011 I have a gradient being used on a sidebar on a website, but I need to to somehow stretch the length of the page. Is it possible to create a larger image of the gradient and resize it to fit the size of the rest of the content? Here is the website link: http://webdesignsbyliz.com/s2design/ Can anyone advise me on the best way to do this? Link to comment https://forums.phpfreaks.com/topic/232590-gradient-question/ Share on other sites More sharing options...
cssfreakie Posted April 4, 2011 Share Posted April 4, 2011 there are multiple ways to do this, and it depends a bit on your gradient. (i am not sure if there is a best way) Right now you are using a linear gradient that end in the bottom with a color of : #CCCCCB so in case you want that particular dive to strech out to the bottom of the page, you could add a background color to it of #CCCCCB What you could also do is set an image as content (in your html to 100% and maybe even a position fixed on it. But in the end it depends on your design, Is the footer at the bottom clearing all above and beneath it or is it a small footer sitting at the right so the left div can reach to the bottom. those are 2 different situations. but something you can already improve is the width of that image. you could make it 1px width and set repeat-x on it Link to comment https://forums.phpfreaks.com/topic/232590-gradient-question/#findComment-1196434 Share on other sites More sharing options...
mat3000000 Posted April 16, 2011 Share Posted April 16, 2011 instead of using an image for the gradient, use pure CSS .sidebar{ background: #A3364C; /* for old browsers */ background: -webkit-gradient(linear, left top, left bottom, from(#------), to(#------)); /* for webkit browsers */ background: -moz-linear-gradient(top, #------, #------); /* for firefox 3.6+ */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#------', endColorstr='#------'); /* for IE */ } Link to comment https://forums.phpfreaks.com/topic/232590-gradient-question/#findComment-1202300 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.