• Resolved Perfect Circle

    (@perfect-circle)


    Can I override any parent file with a child file?

    For example, in my parent (besides the style.css) there is a CSS folder with a file layout.css. i.e. parentTheme/css/layout.css.

    Some of the styles (like the #sidebar) that I want to override are in this file. So I created the same structure in my child theme: childTheme/css/layout.css, but the changes are not affecting. When I inspect it with firebug, it is still pointing to parentTheme/css/layout.css. (note the childTheme/style.css is overriding as expected).

    Another odd thing is that the div holding the sidebar has a class=”primary”, but there is no “.primary” class anywhere in any stylesheet.

    This exercise has come about because I’m trying the make the sidebar into the horizontal (menu) bar stretching 100% across the top. Am I correct in assuming that if a change the #sidebar width to 100% (from 22%) if will achieve this.

    Firebug gives me this

    <div id="content" class="col-full">
         <section id="breadcrumbs">
         <div id="main" class="col-left">
         <aside id="sidebar" class="col-full">
              <div class="primary">
         </aside>
    </div>

    I changed the class from col-left to col-full and sidebar width to 100%. The wp is still reading the parent, so I’m assuming that is the reason there is no change, but if I can get it to read the correct file, will this likely have the effect I want? (assuming that class=”primary” is doing nothing.

Viewing 16 replies (of 16 total)
Viewing 16 replies (of 16 total)
  • The topic ‘overriding Parent files with Child files’ is closed to new replies.