Bootstrap template: where to place the image?

This is a complete newbie question, but:

Using the Bootstrap cover template , how / where should I insert a background image to cover the page?

What am I missing? I tried to insert the following elements inside the template

<div class="site-wrapper-inner"> <div class="cover-container"> <div class="inner cover"> 

the image will be displayed, but not the size, to fill the dimensions of the viewport.

(Or do I not understand the purpose of this template?)

+8
html css twitter-bootstrap
source share
2 answers

Depending on where the background image is applied, it looks like the background is applied to the body tag. In this case, apply this CSS:

 body { background: url(images/bg.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } 

"cover" makes the background fill the block element.

+17
source share

He must go:

 html, body { background: url(images/bg.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } 

If you put it in the body , you will have a small margin.

0
source share

All Articles