WordPress.org

Forums

The Bootstrap
[resolved] @media in child theme doesn't take effect (8 posts)

  1. anyway
    Member
    Posted 2 years ago #

    I'm trying to override

    @media (max-width: 767px) {
    .container {
    width: auto;
    padding: 0 10px;
    }
    }

    in original style.min.css, width

    @media (max-width: 767px) {
    #page-footer .container {
    padding: 0 20px !important;
    }
    }

    in childtheme style.css.

    It seems that any attempt to override @media-styles in childtheme css doesn't take effect. What I'm doing wrong?

    http://wordpress.org/extend/themes/the-bootstrap/

  2. anyway
    Member
    Posted 2 years ago #

    Same, when I omit "#page-footer", by the way ...

  3. anyway
    Member
    Posted 2 years ago #

    That's strange: It is working, when I write the styles directly in the head.

    All other overrides I did in my childtheme style.css are working. Only, the media queries are not. The file is being loaded after the original stylesheet.

    Did anybody ever have the same problem?

  4. Konstantin Obenland
    Code Wizard
    Theme Author

    Posted 2 years ago #

    What browser do you use?

    In general, media queries behave the same way as all CSS and can be overridden. The Bootstrap overrides many Bootstrap media queries.

  5. anyway
    Member
    Posted 2 years ago #

    Thank's for reply, Konstantin.

    Yes, I know that it should be possible. I've worked a lot with child themes before.

    It is the same in all browsers. If you never heard of this problem before, it must be something strange with my files.

  6. anyway
    Member
    Posted 2 years ago #

    Okay, I got it. It was an not easy to find bug in my CSS file. Stupid, but true. Sorry for the unnecessary posting and your patient support, Konstantin.

  7. Begin
    Member
    Posted 2 years ago #

    Any news about that? I have the same problem...

  8. anyway
    Member
    Posted 2 years ago #

    As I wrote already... it was a bug in my own childtheme CSS. It had nothing to do with the theme, or with CSS generally. It was something like a missing semicolon. For a simple test, put your @media stuff to the top of your css file. If it works then, something on the way between is interrupting your css.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic