Home Forums Theme support Theme Tammoo: Custom CSS doesn't work

This topic contains 3 replies, has 2 voices, and was last updated by  7Theme Support 4 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Hello,

    I want to set some custom css to overwrite the theme’s standard css.

    Tried both:
    (1) Placed css code in the style.css of my child theme
    (2) Placed css code in theme options –> General –> Extra css code

    but it doesn’t work.

    Using firebug and locate the snippet with the code to modify, firebug shows the file and line of the original css of the parent child. So wordpress would not use my custom css. The settings of the custom css is correct, because editing in the previoew of firebug, I see all changes running well.

    Here’s my site (still in progress)
    http://www.bettentrend-aschaffenburg.de/
    (front end password: !cominGS00N)

    I want to modify the look (and effect) of the four blue circles juts below the headline Bettentrend: Remove the box shadow

    is:
    .servicebox > div {
    box-shadow: 0 0 0 5px #e4e4e4;
    }

    should be:
    .servicebox > div {
    box-shadow: none;
    }

    Wondering why the theme takes the css from the parent instead of the child’s css or the css from the custom box in the theme options (general)

    Thank you for your help 🙂

    Martin
    }

    Hi Martin,

    unfortunately this is a general problem with child-themes, just search in Google for this problem. WordPress insert first the style.css file of the child-theme, then the original stlye.css from the parent theme, that’s why the parent style will overwrite always the styles from the child-theme. That’s why we don’t use child-themes.

    The only thing you can do is to specify the “path” of the element you want to change, for example:

    body #container #content .servicebox > div

    instead of:

    .servicebox > div

    Or you make the style rules more important with the ” !important ” extension, i.e.

    .sevicebox > div {
    box-shadow:none !important;
    }

    Sorry, but we cannot change the way that WordPress use to add the css files in the child-themes…

    Hello,

    thank you for your reply. I will try toi do so.

    Just for a better understanding. I work with wordpress for a couple of years now. In general, I use child themes and do not have any problems so far with custom css. Depends the functionality of custom css from the internal coding of the theme.

    I thought, if wp do not find any custom css settings, it will use the css from the parent theme. The partent’s css comes witn an @import into the style.css of the child theme and should have a lower priority (means, the child#s css will overwrite the parent’s css.

    Isn’t it correct?

    If it will work as you described, it’s OK. I just want to avoid of loosing my custom css after a theme upsate,

    Thanks & regards
    Martin

    I thought, if wp do not find any custom css settings, it will use the css from the parent theme. The partent’s css comes witn an @import into the style.css of the child theme and should have a lower priority (means, the child#s css will overwrite the parent’s css.

    No, unfortunately no. Please take a look at the source code. WordPress insert first the style.css file of the child-theme, then the style.css file of the parent theme.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.