How to put sidebar to the left of main content area?
-
I’m tryign to put my sidebar to the left of my content, but for some unknown reason.. this isn’t happening. It keeps putting the content BELOW the sidebar. I have been floating it and I’m checking the pixel widths, but something is just missing here and I’m not sure waht it is.
Here’s what the overall template looks like:
<?php /* Template Name: Page Template1 */ ?> <?php get_header('headerpage.php'); ?> <div id="container"> <div id="customsidebar"> <?php get_sidebar(); ?> </div> <div id="content" role="main"> <?php /* Run the loop to output the page. * If you want to overload this in a child theme then include a file * called loop-page.php and that will be used instead. */ get_template_part( 'loop', 'page' ); ?> </div><!-- #content --> </div><!-- #container --> <?php get_footer(); ?
and then here’s some of the css for the attriutes above:
#container { width:822px; } #customsidebar { float:left; width:220px; } #content { width:580px; float:left; }
I tried floating the content to the right, to the left. Also, the 220 + 580 = 800px and the container area is 822 pixels across so it should fit. I mean, I feel liek this is basic css/html and it should work… i’m guessing i’m missing some wordpress esque command ors omething. does anyone see something wrong with this?
- The topic ‘How to put sidebar to the left of main content area?’ is closed to new replies.