Bootstrap container fill sides with colors

后端 未结 3 1873
遇见更好的自我
遇见更好的自我 2021-01-20 21:53

I have the following template using bootstrap :

I\'m using a 1200px container for the blue/gray container and the image is 1600px.

I would like to f

3条回答
  •  情话喂你
    2021-01-20 22:50

    Your current problem is that the image is hardcoded to 1600px width. You have two options:

    Make your header completely fluid in width and remove double container wrap you currently have going on:

    Or change the container class width to 1600:

    .container {
        width: 1600px;
    }
    

    http://www.bootply.com/q35ERYfN7A

    Update:

    You can also achive the full background color effect via:

    .blue-background, .light-gray-background{height: 100vh;}
    body{background: linear-gradient(90deg, #004a87 50%, #f2f1eb 50%);}
    

提交回复
热议问题