[resolved] How To Align Sidebar With Header? (8 posts)

  1. jayjaydeng
    Posted 5 years ago #

    I recently installed the Content Slider plugin into my header but I can't seem to line up my sidebar with it. If you take a look at my website you will see that there is a empty void. Does anyone know the right CSS coding required to line them both up?

  2. govpatel
    Posted 5 years ago #

    Try having that slider in main as looks it is outside the container else you will have change the layout as sidebar and content are in same container.

  3. jayjaydeng
    Posted 5 years ago #

    No luck still, I can't even find the section where I can edit the main.php template because for the theme I have (Delicate by Natty-WP) doesn't have it.

  4. Michael
    Forum Moderator
    Posted 5 years ago #

    the main template is index.php;

    it seems that you are showing the slider only on the front page;
    is that with using a conditional statement, or plugin settings?

    you sould try to move the code from header.php to index.php, to just after: <div class="narrowcolumn">

    that way, it would show above the posts, and leave the sidebar in its position.

    a different option could be, to add a negative top margin to the sidebar, only on the home page (by adding a new style to style.css of your theme):

    body.home #sidebar { margin-top: -360px; }

    but there might be limitations in browser compatibility.

  5. jayjaydeng
    Posted 5 years ago #

    alchmyth, you are a genius! A THOUSAND THANK YOU'S!

  6. Paolo
    Posted 5 years ago #

    is there any way to level my sidebar to my header without using negative margin? im worried about browser compatibility.

  7. Paolo
    Posted 5 years ago #

    there is something blocking on my sidebar, even though i already put z-index: 99999;

    any other idea how to level my sidebar on my header?

    Please help.

  8. Paolo
    Posted 5 years ago #

    Okay, I figured it out. I have overflow: hidden on my content area. :)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.