why is adding "get sidebar" conflicting with my content ?
-
Hi,
I am creating my first wordpress theme and im running into trouble when adding the sidebar.
I have a simple header and footer, then I have a “content” div, aligned nicely to the left directly under the header.
When I add the “get sidebar” in the “Index”, the sidebar becomes nicely aligned on the right under the header. But my “content div” jumps way over to the left of the screen..??I have included the code in my “index” file here, can anyone help?
<body>
<?php get_header(); ?>
<?php get_sidebar(); ?>
<div id=”content”>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2>“><?php the_title(); ?></h2>
<?php the_content(); ?>
<?php endwhile; else: ?>
<h2>Woops…</h2>
<p>Sorry, no posts we’re found.</p>
<?php endif; ?>
<p align=”center”><?php posts_nav_link(); ?></p>
</div>
<?php get_footer(); ?>
</body></html>
-
That code doesn’t really tell us anything. It’s sounds like a combination of CSS and HTML issues but without seeing the code on your site it’s impossible to tell.
Can you post a link to your site?
guess: there might be some html tags in sidebar.php, which may, in combination with the existing css styles, interfere with the position of the #content (?)
try to check your site with http://validator.w3.org/
a link to your site where the problem can be seen, might get you more help.
Hi sorry about the late reply. Thanks very much for the replys!
Iv decided not to use a sidebar after all, I dont need it. Its just for a basic website.
..Although I am running into trouble where the posts have the information on the website, but the HTML doesnt work with the wordpress posts. I have to have a fixed page height at X amount of pixels, but if the content in the posts have very little content, the page is too big. If it has a lot of content it runs over and past past my footer.
Does anyone know how to size the page in relation to the posts ?
Here is a link to the site http://www.flexhk.com/wordpress (i dont think its IE ready yet)
Hope you can help, be appreciated as always..
- The topic ‘why is adding "get sidebar" conflicting with my content ?’ is closed to new replies.