Hi,
I’m trying to put a widget area beside logo, logo at left, widget at right and menu below, but I can’t.
I tryed to add the following code in functions,php
register_sidebar(array('name'=>'header',
'before_widget' => '<div id="widget-header" ><div class="widget"><ul>',
'after_widget' => '</ul></div></div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
// add widget to header
add_action( 'ava_main_header', 'enfold_customization_header_widget_area' );
function enfold_customization_header_widget_area() {
dynamic_sidebar( 'header' );
}
and in the css custom file
#widget-header {
position: absolute;
top: 0;
right: 0;
}
but I get my widget area in the right of the screen outside the container margin.
Any idea?
Thanks.
Hi,
Can you post the link to your website please?
Regards,
Josue
Hi Josue,
The page is not in production yet, I was working in localhost.
Hi!
Try adding z-index
here:
#widget-header {
position: absolute;
top: 0;
right: 0;
z-index: 10;
}
Regards,
Josue
Thanks Josue, but is not a z-index problem.
I want that my widget area be inside de container area, aligned to the right.
I attach an image to explain me better:
Try changing the hook to ava_after_main_menu
, instead of ‘ava_main_header’.
Best regards,
Josue
That works fine.
Thank you very much.
You are welcome, glad to help :)
Regards,
Josue