Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

fixed background not working in chrome

l have written a piece of code to display my background as fixed but it does not seem to work on chrome.

.fixed-image{
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-image: url(../img/home/1.jpg);
}

any ideas how l can resolve this please?

2 Answers

Apparently this is a common problem. A Google search led me here: http://stackoverflow.com/questions/20268962/fixed-attachment-background-image-flicker-disappear-in-chrome-when-coupled-with

Basically it boils down to this: Try setting the position: property of the element to static and make sure there are no manually set values to the 'position' property other than 'static'.

all the solutions are not parsing

Your CSS is working for me on Chrome.

http://codepen.io/anon/pen/VYPWzr