Search code examples
htmlcsstwitter-bootstrapmedia-querieswidth

Change width of Bootstrap container


I need to add Bootstrap container + 60px.

How I can do it, without changing Bootstrap itself ?

I've tried this media query, but it doesn't work.

    @media (min-width: 1200px) {
        .container{
            max-width: 1260px;
        }
    }

How can I do that ?


Solution

  • Just change your css code to 1260px, in case you dont wan't to change this in your bootstrap css file, make a new file and set it like so:

    @media (min-width: 1200px) {  
        .container {
            width: 1260px;   
        } 
    }
    

    Make sure your new file is loaded below the original file of bootstrap css. Dont use max-width in this case. Good luck!