WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Sidebar can't be moved down beside content, what do I do? (11 posts)

  1. AlexSandager
    Member
    Posted 1 year ago #

    http://pc-electronics.dk/?page_id=13
    As you can see in the link above, I need to move my sidebar down beside my content. So it looks like a normal website.

    Can someone please help me? this has been driving me crazy for the last 2 days.

    MY CUSTOM PAGE TEMPLATE

    <?php
    /*
    Template Name: Cover Page
    */
    ?>
    
    <?php get_header(); ?>
    
    <div id="main"> 
    
    <ul id="sidebar">
       <?php dynamic_sidebar( 'secondary-sidebar' ); ?>
    </ul>
    
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <div style="width:850px; margin-left: 350px !important}
    <?php the_content('
    
    <div id="content" class="widecolumn">
    Read the rest of this page �</p>'); ?>
    <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    <?php endwhile; end: ?>
    
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    </div>
    
    </div><!-- #main -->
    
    <?php get_footer(); ?>
  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Can you not just float it left?

  3. AlexSandager
    Member
    Posted 1 year ago #

    in style.css or what do you mean?

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    You ought to add new styles externally, not within the theme's files. Changes to the theme's files will compromise the theme and be compromised when the theme updates.

    External changes can be made using a Child Theme or through a plugin that provides Custom CSS functionality.

    I recommend using the Jetpack plugin and its Custom CSS functionality to hold your CSS modifications.

  5. AlexSandager
    Member
    Posted 1 year ago #

    the first thing you talked about "just float it left" what and how should i float it to maked them beside each other?

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

  7. AlexSandager
    Member
    Posted 1 year ago #

    They are already floating left. I have 3 sidebars. they are all at my frontpage. check this out.

    http://pc-electronics.dk/

    }
    
    #sidebar-primary {
        overflow: hidden;
    	float: left;
        width: 295px;
        margin-left: -65px;
    
        overflow: hidden;
    	float: left;
        width: 295px;
        margin-left: -65px;
    }
    
    #infobox {
        overflow: hidden;
    	float: left;
        width: 295px;
        margin-left: 22px;
    }
    
    #sidebar-secondary {
        overflow: hidden;
    	float: left;
        width: 295px;
        margin-left: 20px;
    }
  8. Andrew
    Forum Moderator
    Posted 1 year ago #

    Those styles apply to different HTML elements. I'd recommend looking up the CSS selector links I posted.

  9. AlexSandager
    Member
    Posted 1 year ago #

    I do not understand how I can use it? .

    All I want is a page template, with a sidebar to the left and content to the right.

    I have looked all over the internet and I can't find one that works :-(

  10. Andrew
    Forum Moderator
    Posted 1 year ago #

    You may retrieve better support from CSS-specific forums like http://CSSCreator.com/forum

  11. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    [duplicate of http://wordpress.org/support/topic/how-do-i-add-a-sidebar-to-a-fullwidth-page?replies=5 - please stay with one topic and continue with your original topic to avoid confusion]

Topic Closed

This topic has been closed to new replies.

About this Topic