November 14, 200818 yr Ok, I'm still working on my wordpress theme, but am at a loss. I will try and explain the best I can............ I am using an image for the content which will obviously expand at the contend gets bigger. (but in my case it's not!) I also want the sidebar to float to the right. Now if I was using plain ol' simple html/css I would do this <div id="container"> <div id="content"></div> <div id="sidebar"></div> </div> And I used this method (I think) but alas it didn't work. Here's my index code..... <?php get_header(); ?> <!--main content begins--> <div id="container"> <div id="content"> <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <div class="entry"> <?php the_content(); ?> <p class="postmetadata"> <?php _e('Filed under:'); ?> <?php the_category(', ') ?> <?php _e('by'); ?> <?php the_author(); ?><br /> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <?php edit_post_link('Edit', ' | ', ''); ?> </p> </div> </div> <?php endwhile; ?> <div class="navigation"> <?php posts_nav_link(); ?> </div> <?php else : ?> <div class="post"> <h2><?php _e('Not Found'); ?></h2> </div> <?php endif; ?> </div> <!--main content ends--> <?php get_sidebar(); ?> </div> <?php get_footer(); ?> Can anyone see any error(s) or suggest a better way of doing it?
November 15, 200818 yr Author Any thoughts anyone? I'm getting pretty desperate now as I can't progress until I sort this out.
November 15, 200818 yr Are you closing the container div? I would do it so that the top and bottom of the black area in your example are fixed images (above and below content/sidebar), and then where your arrow is pointing, make that into something that is 1 pixel high and do repeat-y in the CSS? Or have I misunderstood? Float both content and sidebar left* and add clear:both to the footer. *It might be better to float content div left and sidebar div right and make sure that there is a bit of space between so that in some cases it doesn't get broken down to the next line (IE seems to do this sometimes because of their interpretation of the box model).
November 15, 200818 yr Author The sidebar seems to be setting the height of the body image (which is 5px high and repeated) The content spills over into the footer. I know I have made an error, but I can't pin point it. Instead of being snow blind, I'm code blind.
November 15, 200818 yr Author Maybe the error is in my css? * { margin:0; padding:0; } body { font-family:"Times New Roman", Times, serif; font-size:16px; text-align:left; vertical-align:top; background-color: #396484; background-repeat:repeat-x; color:#333333; } a:link, a:visited { text-decoration:underline; color:#336699; } #outer { background-image:url(images/helenbg_day.png); background-repeat:repeat-x; } #wrapper { margin: auto; width:966px; text-align:left; } #container { background-image:url(images/helenbody_day.png); width:966px; height:auto; } #header { background-image:url(images/helenheader_day.png); background-repeat:no-repeat; width:966px; height:275px; } a#headerlink { } #content { float:left; width:600px; padding-left:95px; padding-bottom:25px; } #sidebar { float:right; width:300px; } .sidebar ul { list-style-type:none; } #footer { background-image:url(images/helenfooter_day.png); background-repeat:no-repeat; height:202px; width:966px; padding-top:75px; text-align:center; }
November 15, 200818 yr I don't suppose you have a live version, do you? You can PM it if you don't want the link to go out public
Create an account or sign in to comment