• Hi, I am using the twenty fifteen theme. I have a css manager and I have been adding this: .tag-links {display: none;}

    It does not change the tags showing after each post. It is so baffling to me. Am I supposed to put it in a certain place with in the Css manager? Do you have any suggestions.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Try adding !important

    .tag-links{display:none!important;}

    The class is tags-links and not tag-links, so just add an ‘s’ after the word ‘tag’. By the way, you should avoid using the !important clause as a “fix-it-all” solution.

    @crouchingbruin what do you mean “fix-it-all” solution? It just prioritizes code when doing overrides.

    When I see someone using !important, it usually means they don’t understand CSS specificity. Yes, it “prioritizes” properties by adding a very high specificity value to the selector, but not understanding the ramifications of using it can make writing other rules in the future more complicated. As a simple example, let’s say I want to make all of the links on my site blue. I could add a rule like this:

    a { color: blue !important;}

    Later on, I decide I want the links in my footer to be red, so I try adding this rule:

    .footer a { color: red;}

    But, of course, this isn’t going to work, because the first rule’s use of the !important clause gives it a much higher specificity, so now I have to add the !important clause to this rule as well. Pretty soon, you end up using !important to all of your rules. The general guideline for writing a CSS rule is to use only enough specificity to override the existing rule, so that in case you need to override this new rule later, it is easier to do so. So what I do when I want to override an existing CSS rule is to inspect the element using a web debugging tool like Firebug or Chrome Developer Tools, see what the existing rule is, then add a rule with either an identical selector, or with a selector which has an additional element to make the selector a little more specific than the existing rule (if my new rule is going to come before the existing rule). The only time I use !important is if I need to override an inline style (which is the only way to override an inline style) or if the existing rule has so many elements in the selector that it’s impossible to add a new rule with additional elements (somewhat unusual).

    Thread Starter xpectmore

    (@xpectmore)

    CrouchingBruin, I am so glad that I added my question to this forum. I spent hours trying to figure out the issue. I did exactly what you said to do and…….It Worked!!

    Thank You so much.

    Will you please take a look at my website and give me your opinion on any other improvements that I can make. See if you think it looks horrible or has errors. Please…

    xpectmoreautomotive.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hiding Tags from each post’ is closed to new replies.