The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS bootstrap responsive background

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #204041

    I am trying out bootstrap for pretty much the first time and I am having some trouble. I created a nice header background. It’s 680px tall. My html looks like this

    <div id="header">

    Then in my css I did this

    #header {
       background image url
       min-height: 680px;
       background-size: 100% auto;

    This does give me a responsive background but it also cut the bottom of my image off. So now I would need to up the min-height by a few more hundred pixels which isn’t right. What did I do wrong?


    Looks like the solution is background-size: contain;

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.