I researched this topic for the last 2 days in a row, tried 250+ code options, and I'm at my end, that's why I'm here now ... I feel like I'm very close to a solution, so hopefully someone here can shift it to the edge ... I'm new to CSS, so if I'm from here from here, I apologize ...
I am trying to achieve an effect that you can view on the stumbleupon.com homepage. When the page loads, the bg image fits perfectly into the visible area of ββthe browser, regardless of resolution. The bg image is not fixed, so you can scroll down to view more content. You can see the same effect at http://www.bakkenbaeck.no/ ... again the original image is perfect and not fixed with the content below.
I thought I finally found my answer when I came across the StackOverflow question and the answer here. Creating a div corresponds to the first screen
I followed the instructions there and came ooh ... but without a cigar.
You can view my test domain, which I installed on www.konnect.co
The code entered for this bg image is
#wrapper-8 { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: url(http://bakkenbaeck.no/content/01-work/01-easybring/01.jpg) no-repeat center; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; }
This displays the image in two browsers that I checked. However, the bg image completely overlaps the contents of the second div on the page. I created a 2nd div, gave it the color bg and added some content for testing, and it was hidden behind the bg image from the div above it. If you resize the browser to a smaller size, it will allow you to start scrolling when the bg image becomes small. Am I missing something using bg image div here? I tried several height options, but can't change anything. Any help would be greatly appreciated.
source share