Jump to content

Css3 Gradient Issue


DannyGolden

Recommended Posts

Hey all, I'm getting this weird issue in Chrome when I try to apply any sort of gradient. The gradient will only extend the length of the content and not finish the entire page out. I believe my syntax is correct and all but if I just have my logic wrong please tell me. (: Here is what I mean:http://i41.tinypic.com/httf01.jpg Here is my CSS:

body {background: #3B3734;background: -webkit-linear-gradient(top, #5c5b51 0%,#262622 100%); /* Chrome10+,Safari5.1+ */color: #FFFAF6;font-family: Helvetica, Arial, Sans-Serif;}

Link to comment
Share on other sites

Apply the gradient to the <html> element instead. The <body> only does stretch out to fit the content.
Unless there is something special you need to do in order to style the HTML element, here is what I did...
html {background: -webkit-linear-gradient(top, #5c5b51 0%,#262622 100%); /* Chrome10+,Safari5.1+ */}

Link to comment
Share on other sites

Hmm, well I did learn something new. While the HTML element does extend around all the content, the gradient seems to fit only to the height of the content it contains, unlike background color or background image.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...