The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Dueling stylesheets driving me nuts

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #35187

    I’m trying to do a custom style for a WordPress log-in page, and it’s loading custom-login.css just fine. It’s also loading login.css and colors-fresh.css from the core, but it’s loading my custom file last…so any rules in that file should take precedence, right?

    But they’re not: the dark blue links which should now be white (on the dark blue background) are still the same dark blue that’s specified in colors-fresh.css.

    I’ve re-written those rules in custom-login.css. I’ve placed them last in the stylesheet. I’ve added “!important” to each of them. And the links are still showing dark blue with a red hover state, as specified in colors-fresh.css. I’m pulling my hair out, and I don’t have enough of it to begin with. Does anyone have any insight into what might be happening?


    Not necessarily, even though they are loaded last, if the CSS rules are more specific in the fore-linked CSS stylesheets they can still rule. For instance:

    #wrapper header nav ul li a#home {color:white;}

    #wrapper a {color:blue;}

    The first style wins. Remember IDs are the more specific than tags and classes as well.


    That was it.

    “.login #login p#nav a:hover” beats “a:hover”

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.