Relative CSS / boot newbie.
I spent some time trying to get a background image for integrating with Twitter Bootstrap using the first method of this CSS Tricks page . I ended up using "body" as a CSS tag because HTML just ... didn't work. While everything works fine in general, the image starts βbehindβ the top navigation bar and then continues down, so the top is hidden behind the black navigation bar
I tried using margin-top to align the top of the background image with the bottom of the navigation bar, but it also moves the container and all subsequent content down (obviously, as I put the margin on the full page text).
I also tried to create a unique class for the background image and placed the div right in the body tag and closed the div right in front of the html close tag, but once again setting it up adjusts the whole page and not just the background image.
Moving the div for the background image below the navigation bar limits it to the active space of the "container", so the background image now exists only in the middle of the screen.
body { background: url(../images/height-chart500w.png) repeat-y fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: 15%; }
Given the properties of changing the background image, the hackerβs decision to simply change the image to create space at the top will obviously not work. How is CSS that the background image is below the navigation bar?
source share