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

css image issues

my test site www.strumfastmusic.com/Circles on the welcome view...its title on the screen literally says welcome view....im trying to apply a bg image to the #animation-holder but it wont let me for some reason..help?

6 Answers

Check your source files - the output is <h1 class>welcome view</h1> I'm guessing you were trying to assign a class of "welcome view" If you post the relevant html and css it'll be easier to see what you're going for.

no im not trying to assign any class....im just trying to assign the bg.png as the background for the #animation-holder using background-size cover

Your background is showing but it's stretching so that only the blue part at the top is showing. #animation-holder is 100% width. Is your objective to have that image stretch to cover the full width of the browser but squeeze the height to the size of the div?

yeah and when i add cover or no-repeat it makes the img disappear

I think your image is too tall and not wide enough for the space. You could crop out the blue space at the top leaving just the building images at the bottom. It would be good to use a wider image also - it's going to be stretched to 1900px or more on many monitors. When you add background-size: cover it's not disappearing, it's stretching in width and height, but the bottom is cut off so all you see is blue from the top of the image.

I Added this and it works , but i don't know if thats what you are looking for.

.page-home, .page-welcome, .page-signin, .page-discounts {
background:url(http://webneel.com/wallpaper/sites/default/files/images/04-2013/20-beach-sea-photography.jpg);
background-size: cover;
margin:0;
padding:0;
}

alt text