• Resolved Debely

    (@debely)


    Hi everyone

    I have a problem with layout on my site when I try to include a forum on it. I’ve been using a free Layers theme and already did some tweaks with the menus but this problem is really giving me a headache.

    You can see below what the problem is:

    About page:
    http://tricksforaffiliates.com/?page_id=164
    Forum page:
    http://tricksforaffiliates.com/?page_id=1860

    What I managed to figure out so far is the problem has something to do with the page or sidebar php.

    If I remove the sidebar from pages everything looks ok with the forum but I loose sidebar on all the pages which I don’t want.
    If I add one more </div> at the end of sidebar I get rid of the gap in the forum container but then sidebar is above the content in all pages as shown in the next picture:

    http://postimage.org/image/gn7c1p7wn/

    I used Firebug to determine what is wrong and what to change but the main problem is that I don’t know which page it refers to and all the page checkers just give a bunch of errors that don’t give me any solid info.

Viewing 3 replies - 1 through 3 (of 3 total)
  • In style.css add

    #spMainContainer {
        float: left;
        width: 100%;
    }

    How does that look?

    both links have the same validation error (which also occurs in single posts):

    end tag for element “div” which is not open

    http://validator.w3.org/check?uri=http%3A%2F%2Ftricksforaffiliates.com%2F%3Fpage_id%3D1860&charset=%28detect+automatically%29&doctype=Inline&group=0

    so that is something possibly wrong in your templates (?)
    http://codex.wordpress.org/Validating_a_Website

    —-
    if you want to remove the sidebar from the forum page, use a conditional statement in page.php to wrap the get_sidebar(); code; also add a css class to the #main div (the lines are virtually at the start of page.php):

    example of how the lines should be after the edit:

    <?php if( !is_page( 1860 ) ) get_sidebar(); ?>
    
    <div id="main"<?php if( is_page( 1860 ) ) echo ' class="forum"; ?>>

    and add this to style.css:

    #main.forum { width: 96%; }

    —–
    if you want to keep the sidebar in the forum page, try and add this to style.css (some element of the forum has a ‘clear:both’ in an inline style which is somehow interfering):

    #main { overflow: hidden; }
    Thread Starter Debely

    (@debely)

    No wonder I couldn’t find a solution in the code if something needs to be added 😛

    Thank you Aaron, that worked like a charm.

    Also thank you alchymyth for your input. I need to look into the validation thing more in detail before thoroughly understanding it. Currently the forum still contains the sidebar but at least I have somewhere to check if I ever wanted to remove it.

    Thanks again to both of you
    Rgds
    Matej

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

The topic ‘Layout problem on forum page’ is closed to new replies.