Answer the question
In order to leave comments, you need to log in
HTML & Bootstrap Questions?
Hello.
1) Please tell me how to make a rubber background (picture) in html so that the main container is centered.
2) Can someone remotely (tw etc) show the main working Bootstrap tags (I mean, creating a simple header-content (two-three columns)-footer template)?
skype wasd360
Thank you!
Answer the question
In order to leave comments, you need to log in
one)
<div class="container-fluid">
<div class="container">
<div class="row">
<div class="col-md-12">center</div>
</div>
</div>
</div>
.container-fluid{
background: url('image.jpg') no-repeat top center;
background-size: cover;
}
I did this:
For example, the image size is 1600x500
500/1600*100=31.25%
.bg{
background:url(images) center center;
background-size: cover;
padding-top:31%
}
This is if your block does not contain content, if there is content then position absolute for it and measure, or subtract content from padding as a percentage. If it's for body then you don't need padding at all.
Slightly stupid variak, but in a different way, I only wrote through js.
startbootstrap.com/template-categories/all
here are bootstrap templates, you can see everything there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question