Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #502172

    Hi Guys!

    Again, thanks for all the features you put into Enfold. It’s almost just how I’d have done it myself–and I don’t say that very often. I just wish I’d have known earlier that you can actually enter script code into a Code Block and have it run. Until the other day I thought a Code Block was just for displaying code. Anyway…

    This doesn’t happen all the time, but sometimes, I’ll create a new class in my child theme’s CSS file and apply it to an element, but it does not override what’s already applied in the dynamic_avia css file. For instance, I created a class called white-text and applied it to an H3. Normally the H3’s color would be controlled by .main_color h3, which makes sense. However since it’s loaded AFTER the dynamic_avia css file, a class in the child theme’s CSS file that’s applied to an element SHOULD override a style applied directly to that element in the dynamic file, should it not? A view source confirms that the child theme css file is loaded after the dynamic_avia one, and I’ve confirmed that I can force it with !important, but I don’t like doing that if I don’t have to.

    Any suggestions?

    Thanks!

    #502267

    Hi scotthco,

    Sometimes you need to force it with !important, especially if the property is set already, it’s not a big deal really. Please link to the site in question so that we can have a closer look.

    Regards,
    Rikard

    #503069

    Hi Rikard:

    Thanks for the reply. I’ll paste the URL to the page in question in the private content area below. The text in question is the part that starts off, “One bite of our…”, in the lighter gray highlight box. You’ll see that the child theme’s style.css is loaded two lines after the dynamic_avia css file yet still does not override the text color, even though it seems to me like it should. I have used !important for now. However if you can tell why this is necessary, please let me know.

    Thanks!

    #503077

    Hey!

    The link you posted is returning:

    403 – Forbidden: Access is denied.

    Regards,
    Josue

    #503078

    Hi Josue:

    Thanks for responding so quickly. Sorry, we’ve had serious trouble with some overseas IPs trying to abuse our server. If you let me know what your IP is (I usually use WhatIsMyIP.com) I should be able to tell if it’s blocked and if so free up a chunk.

    Thanks!

    Scott

    #503090

    Would be better if you could lift the block for some time so the whole team can help, is !important working btw?

    Cheers!
    Josue

    #504385

    I can lift the block for as long as necessary, but I have to know what to unblock. Considering the problems we had, I’m certainly not going to unblock everything. Oh, and !important does work. It just shouldn’t be necessary. A css file that’s loaded later should override styles from those loaded earlier.

    Thanks!

    Scott

    #504386

    Hi!

    Depends on where the file is been setup and that is why sometimes !important it is needed.
    It is not something to be used.

    We can not define the IPs’ as any of us is using a different one!

    Best regards,
    Basilis

    #504437

    Basilis, what do you mean by, “It is not something to be used.”?

    Ok, I found a quick way to remove and add back all the IP restrictions I have in place on my development machine. So I’ve removed them until we’re done with this issue. All of you should now be able to access that URL I mentioned above.

    Thanks!

    #504450

    Loads for me now, but im not sure where’s code block in question, in any case file load order doesn’t necessarily alters the specificity of CSS when more important selectors (like id) are present, for example:

    File1.css

    #id .class element{
    color: red;
    }

    File2.css

    .class element{
    color: blue;
    }

    The first block will override the second one regardless of file order.

    #505136

    Hi Josue:

    Glad that loads for you now. The text in question is the part that starts off, “One bite of our mouthwatering ‘cue…”. It’s in the lighter gray highlight box about halfway down the page. Right now it’s correct (i.e. white) because I’m using !important. I believe the original CSS that was persisting was .main_color h3. What I thought was supposed to override that is the class .bb-home-highlight-box, which is in the child theme’s style.css file. Was the original not being overridden because it was being applied to a fairly specific H3 element?

    Thanks!

    #505203

    Hi!

    Yeah larger selector have more priority, if you simply change it to something like .main_color .bb-home-highlight-box or #top .bb-home-highlight-box it will work without !important.

    Regards,
    Josue

    #505800

    Thanks, Josue! That does work. I’ll have to remember that. I’m sure there are other places in my CSS where that’ll come in handy.

    #505801

    You are welcome, glad to help :)

    Regards,
    Josue

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.