What’s probably happening is that your function creates widgets with HTML tags, but no HTML classes, which might prevent your widget’s CSS rules from being applied to them, but it would help if you could post a link to your website. Also, is “sidbar” a typo?
P.S : sidbar it’s the ID name of the sidebar 🙂
you’re right i just add the name of ID ‘ sidbar’ and didn’t add the name of the classes, my theme right new is just in my localhost I’m waiting until finishing the work & upload it to my Host, but i take a screenshot and it’s here :
here on imgur
as i said you’re right i just added the ID but i didn’t added the classes, now the answer How i do to add classess 🙂 and thank you so much
another P.S:I’m not English Native speaker
You can control the HTML used to output your widgets using before_widget, after_widget, before_title, and after_title. If you call register_sidebar() like this:
register_sidebar( array(
'name' => 'sidbar',
'before_widget' => '<div class="widget">',
'after_widget' => '</div>',
'before_title' => '<h1 class="widget-title">',
'after_title' => '</h1>'
) );
Then each widget would be wrapped in a <div> with the class “widget”, and the title of each widget would be wrapped in an <h1> with the class “widget-title”. You could then target the widget using CSS like this:
.widget {
... CSS code ...
}
.widget .widget-title {
... CSS code ...
}
You might consider checking out any one of the many CSS tutorials out there.
Thank you so much you help me to solved this problem Thank you again,
I was wondering if i can add more than one class in a div but today i learned that i can add more and how to do that :), i use :
if(function_exists('register_sidebar'))
register_sidebar(array('name' => 'sidbar',
'before_widget' => '<div class=" block_cat block_arc ">',
'after_widget' => '</div>',
'before_title' => '<h1 class=" block_cat block_arc ">',
'after_title' => '</h1>'
));