[resolved] style.css precedence (linky) (3 posts)

  1. bransom
    Posted 3 years ago #

    Embarrassed, but stuck on a simple issue...
    I have a child theme 'My_Mantra" and style.css in that folder, and the first two lines after the heading lines in my child style.css are:
    @import url("../mantra/style.css");
    #linky { z-index: -1; }

    So why does my own style line above get over-ridden by the theme? Firebug shows
    #linky { //site_url
    display: block;
    height: 120px;
    position: absolute;
    width: 1100px;
    z-index: 1;
    #linky { //style.css
    z-index: -1; <--Firebug shows this with strikethru (over-ridden)

  2. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Without seeing your site, no way to answer for sure - where is the overriding style coming from? If it's inline, that will override external CSS.

    Also note that you have specify a position when using z-index:


  3. bransom
    Posted 3 years ago #

    Thanks WPyogi, This turned out a dumb typo on my part. I had tried adding !important to the z-index: -1 property, but goofed and had it in there as "important!"

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic