• Resolved woodson02

    (@woodson02)


    How can I change the parents css through my child themes css – when the child theme doesn’t need that attribute.

    For example – I don’t want #branding to have a position:relative. I want to remove that property all together. How can I remove that without deleting it from the parent?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You could do that by assigning the default value for that property.

    For this example the default for position is static
    https://developer.mozilla.org/en-US/docs/Web/CSS/position

    So in your child theme, use this

    #branding { position: static; }

    Be noted that there is no need to nullify everything we don’t need though, a lot of thing from parent is needed but we don’t see it in effect until it was removed (or changed).

    Thread Starter woodson02

    (@woodson02)

    Thanks so much. I added sidebars above the #heading and despite changing the z-index the #heading was still covering the sidebars so my links wouldn’t work. I changed position: inherit; and it fixed the problem.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Theme: Twenty Eleven] Changing parent CSS when child doesn't have attribute’ is closed to new replies.