• Hi everyone,

    I love this theme so much! It looks great even though I am a total newbie.

    I have added an extra widget area after the header according to the tutorial on the website.
    I have used this area to put a search box on my website which worked out. But in default the searchbox as well as the text above the searchbox is completely to the left and I would like to have it aligned in the center. I am however unable to make that work.

    Can you help me out?
    The link: http://www.songwithname.com

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,
    Do add this to your child theme’s style.css

    .my-extra-widget{
    	width: 50% !important; /* Adjust */
    	margin:auto;
    }
    Thread Starter marielle84

    (@marielle84)

    Thank you. It didn’t work out the way I wanted to.
    The fact that the searchbox is slightly smaller is great, but it’s still not nicely centered in the middle.

    Anybody have any idea how I can solve this? And also to center the text above the searchbox?

    Edit: I worked out a way to make it work.

    In the functions.php I have added a small bit of code to the original code of creating an extra widget area:

    // Adds a widget area.
    if (function_exists(‘register_sidebar’)) {
    register_sidebar(array(
    ‘name’ => ‘Extra Header Widget Area’,
    ‘id’ => ‘extra-widget-area’,
    ‘description’ => ‘Extra widget area after the header’,
    ‘before_widget’ => ‘<div class=”widget my-extra-widget” align=”center”>’,
    ‘after_widget’ => ‘</div>’,
    ‘before_title’ => ‘<center><h2>’,
    ‘after_title’ => ‘</h2></center>’
    ));

    This made the text align in the center as well as the searchbox.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Style/adjust extra widget area after header’ is closed to new replies.