Sidebar can't be moved down beside content, what do I do?
-
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(); ?>
-
Can you not just float it left?
in style.css or what do you mean?
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.
the first thing you talked about “just float it left” what and how should i float it to maked them beside each other?
Float your sidebar left using CSS
http://www.w3schools.com/css/css_float.asp
http://coding.smashingmagazine.com/2009/10/19/the-mystery-of-css-float-property/
http://webdesign.about.com/od/advancedcss/a/aa010107.htmUse the CSS selector;
#sidebar
To identify your sidebar.
http://www.w3schools.com/cssref/css_selectors.asp
http://css.maxdesign.com.au/selectutorial/They are already floating left. I have 3 sidebars. they are all at my frontpage. check this out.
} #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; }
Those styles apply to different HTML elements. I’d recommend looking up the CSS selector links I posted.
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 🙁
You may retrieve better support from CSS-specific forums like http://CSSCreator.com/forum
[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]
- The topic ‘Sidebar can't be moved down beside content, what do I do?’ is closed to new replies.