Forums

Removing CSS attributes in child theme (4 posts)

  1. johnsonr88
    Member
    Posted 10 months ago #

    I would like to completely remove various attributes from the parent CSS using the child CSS.

    Is there an easy or universal way to remove them? For example:

    .widget{
    width:290;
    margin-bottom:12px
    }

    I want to remove the width:290 in the child theme. Other times, I want to remove the margin, or link formatting, etc. Is there a universal command I can use to clear formatting from the parent theme?

    This may be more of a CSS question than a WordPress support question.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    There's no universal command. You simply add the new CSS properties to the child theme and they over-write the parent's.

  3. johnsonr88
    Member
    Posted 10 months ago #

    So I set margins and stuff to 0 or none depending what it is. How about width? I can't set width to 0 and setting it to auto doesn't seem to be working for me.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    So I set margins and stuff to 0 or none depending what it is.

    Bingo! :-)

    How about width?

    Try 100%.

Reply

You must log in to post.

About this Topic