• Resolved broadleon

    (@broadleon)


    Hi

    I have two widgets, but they both share

    .widget-content { padding-top:60px; padding-left:40px; }

    Categories is off alignment because of its own css styling, is there a way to asign the categories widget a separate widget css

    .widget-content2 { padding-top:60px; padding-left:10px; }

    Thanks in Advance

Viewing 6 replies - 1 through 6 (of 6 total)
  • some themes add an individual css id (individual to each widget) and a css class (specific to a widget type) to the widget code;

    this is done by the way ‘register_sidebar()’ is used in functions.php of the theme: http://codex.wordpress.org/Function_Reference/register_sidebar
    'before_widget' => '<li id="%1$s" class="widget %2$s">',
    (your theme might be different)

    this would give you the specific css class to target the category widget.

    if you need more detailed help, please post a link to your site.

    Thread Starter broadleon

    (@broadleon)

    Hi thanks

    That looks a little complicated,

    My Site

    open functions.php of your theme and search for register_sidebar(

    in that section, there might be a line:

    'before_widget' => '<div class="widget">',

    try and change that to:

    'before_widget' => '<div class="widget %2$s">',

    the changes should output a widget specific css class, which you should be able to use in your css;
    probably, example:

    .widget_categories .widget-content { padding-top:60px; padding-left:10px; }

    (instead of your .widget-content2 { padding-top:60px; padding-left:10px; } )

    Thread Starter broadleon

    (@broadleon)

    Sorry but there’s no

    register_sidebar(

    That looks a little complicated,

    you are possibly right.

    you might need to ask the theme’s vendor for support –

    helping with a commercial theme is virtually impossible as there is no free access to the theme templates.

    Thread Starter broadleon

    (@broadleon)

    Yep The “theme’s vendor” are really no that brilliant either, But I will give it a go.

    But I’ve got theme issues with the css and internet explorer as well to sort out now.

    In firefox my theme looks good. in internet explorer my site looks like a bomb as hit it. (no really it’s a mess beyond recognition)

    how i’am going to sort it, I really don’t know

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Widget css’ is closed to new replies.