Support » Plugin: Lightweight Widget Area Plugin - Content Aware Sidebars » [Plugin: Content Aware Sidebars] CSS issues with sidebar…

  • Resolved icememory80

    (@icememory80)


    I have a problem with WordPress Theme. I’m trying to put sidebar in header.. and because of sidebar class style it receives “colored” backround. if I will change it then all sidebars will have a change.

    How I can override that style class only so a change will be only in a place I need it?

    part of section in template page.php

    <?php display_ca_sidebar( $args ); ?>
    css section of sidebar

    #sidebar ul li{width:298px;float:left; background:url(i/Modern/sidebar.jpg) left top no-repeat #83b1cd; margin:0 0 19px 0;padding:0 0 10px 0; list-style:none; list-style-type:none; border:1px solid #536867;}

    I need to override “background” to make it none, and to make no border.

    Thanks for Help!

    http://wordpress.org/extend/plugins/content-aware-sidebars/

Viewing 4 replies - 1 through 4 (of 4 total)
  • for formatting problems, try working with a tool such as Firebug http://getfirebug.com/

    or post a link to your site to illustrate the problem.

    Plugin Author Joachim Jensen

    (@intoxstudio)

    The standard style for sidebars inserted with display_ca_sidebar($args); is:

    $args = array(
    'before' => '<div id="sidebar" class="widget-area"><ul class="xoxo">',
    'after' => '</div>'
    );

    I guess that you already have an element with id=”sidebar”. All you have to do is pass the arguments to the function and edit id=”sidebar” to id=”sidebar-header” perhaps. It is crucial that the id is unique.

    Thereafter you can style the new id with CSS.

    Great plugin! I tried them a lot to create different sidebars for different pages, not all worked, some permitted to change one sidebar only, but Content Aware Sidebars is really helpful.

    But unfortunetaly I don’t quite understand: how to override the CSS for a newly created sidebar? (the issue similar to the one described by icememory80).

    Where should I insert <?php display_ca_sidebar( $args ); ?> ? In a page template or sidebars’ templates? In fact, I tried both but in vain (I changed the ID as suggested above). Maybe it just can not be done in Easel theme…

    Thanks.

    Plugin Author Joachim Jensen

    (@intoxstudio)

    display_ca_sidebar( $args ); is optional to use and it only handles sidebars that have the setting Handle: Manually. The function can be inserted anywhere in your theme, but the sidebar is only shown when the content rules are met – even if you pass IDs to the function. Perhaps that is why you don’t see anything.

    If you want to change the HTML for the sidebar so that you better can style it with CSS, you can pass ‘before’ and ‘after’ parameters like this:

    display_ca_sidebar(array(
    'before' => '<div id="new-sidebar" class="widget-area"><ul class="xoxo">',
    'after' => '</div>'
    ));

    As said before, you do not have to use this function if you just want your new sidebars to override your old ones. This is done by choosing Handle: Replace or Handle: Merge in the edit screen.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Content Aware Sidebars] CSS issues with sidebar…’ is closed to new replies.