WordPress.org

Ready to get started?Download WordPress

Forums

ChildTheme CSS cancel 1? (5 posts)

  1. ferdri3
    Member
    Posted 2 years ago #

    Hello,

    I was thinking about disabling

    #primary,
    #secondary {
    	float: right;
    	overflow: hidden;
    	width: 220px;
    }

    but how do I do this in a CSS childtheme? Is placing /**/ around it in a child CSS effective?

  2. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    What do you mean by disable? What are you trying to do?

  3. Digital Raindrops
    Member
    Posted 2 years ago #

    What elements are you trying to overwrite, if you hide the sidebar you will then have to change the template margin or you will have a big space?

    A little more information as to which template page you want to loose the sidebar on?

    If you go to Appearance > 'Theme Options' you can choose a different layout!

    Using a style to change a class in a child theme:
    Change the float in a Child Theme:

    #primary,
    #secondary {
    	float: left;
    }

    Change the width:

    #primary,
    #secondary {
    	width: 260px;
    }

    Hide it:

    #primary,
    #secondary {
    	display: none;
    }

    HTH

    David

  4. ferdri3
    Member
    Posted 2 years ago #

    thanks for the replies,

    I want to lose the sidebar on all templates, which means I need to change the sidebar.php.. which I did..

    The real question I wanted to ask is how to override a style in a childtheme when you dont want an element.

    like this:

    #primary,
    #secondary {
    	float: right;
    	overflow: hidden;
    	width: 220px;
    }

    Lets say I copy this to my childtheme because I dont want a width of 220px.. I want no width actually.. Can I remove that width code? or will it (if I remove it) be copied automatically from the parent theme?

  5. Digital Raindrops
    Member
    Posted 2 years ago #

    In Theme Options:
    Go to: Admin > Appearance > Theme Options
    Choose option: Default Layout > One column No Sidebar
    Then: Save Changes

    In Child theme Stylesheet:

    #primary,
    #secondary {
    	display: none;
    }

    HTH

    David

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.