0
votes

I'm trying to build a responsive website with Bootstrap 3. When I put the @media(min-width:768px) {..} to adjust a few things, the website from 0 to 767px (no media query specified for this), stops using the custom css.

I can't find the logic in this... Thanks

Here is the beginning of the custom css:

@media(min-width:768px) {
h1{font-size: 4.75em;}
h2{font-size: 3em;}
.navbar-fixed-top{
padding:25px 0;
}

body{
padding-top:40px;
font-family: 'Open Sans', sans-serif;
background-color:red;
}

When I resize the browser to a small size, the page doesn't use for example the body tag, but if I delete the @media all becomes normal

1
You don't close the @media with the "}" character....BENARD Patrick
ouch, I'm embarrassed... Thank you very muchNaima

1 Answers

0
votes

you have invalid syntax.

@media (min-width:768px) {
    h1{font-size: 4.75em;}
    h2{font-size: 3em;}
    .navbar-fixed-top{
        padding:25px 0;
    }

    body{
        padding-top:40px;
        font-family: 'Open Sans', sans-serif;
        background-color:red;
    }
}

media selector has to be closed