Wordpress CSS problem

Discussion in 'CSS' started by Barry67, Jun 28, 2010.

  1. #1
    Hi, I have a small problem with my CSS on a wordpress theme. The problem I have is in both Firefox and Internet Explorer when more than 1 post is added the sidebar drops below the content.

    This is my CSS:
    #content {
    	width: 650px;
    	float: left;
    	min-height: 100%;
    	margin-bottom: 20px;
    	margin-top: 20px;
    	text-align: left;
    	padding: 10px; 
    }
    #content h2 {
    	margin: 0em 0em 0em;
    	padding: 0em;
    	font-size: 16px
    	margin-top: -0px;
    }
    #content .post {
    	margin: 0em 0em 0em;
    	padding-left: 10px;
    	padding-right: 10px;
    }
    #content .post h2 {
    	font-size: 26px;
    	margin-top: -0px;
    }
    #content h3 {
    	margin: 0em;
    	padding: 0em;
    	font-size: 26px;
    }
    #content .postmetadata {
    	color: #777777;
    	background: inherit;
    	font-size: 12px;
    }
    #content .navigation {
    	margin: 2em 0em 0em;
    	padding: 0em;	
    	display: block;
    }
    #content .goback {
    	margin: 0em 0.5em 0em 0em;
    	padding: 0em;
    	float: left;
    	font-size: 1.25em;
    }
    #content .goforward {
    	margin: 0em 0em 0em 0.5em;
    	padding: 0em;
    	float: right;
    	font-size: 1.25em;
    }
    #content #comments {
    	margin: 2em 0em 1em;
    	padding: 0em;
    	clear: both;
    }
    #content .commentlist {	
    	margin: 0em;
    	padding: 0em;
    	font-size: 0.9em;
    }
    #content .commentlist li {
    	margin: 0em;
    	padding: 0em;
    	list-style-type: none;
    }
    #content .commentlist img.avatar {
    	float: right;
    	margin-left: 1em;
    }
    #content .commentmetadata {
    	margin: 0em 0em 2em;
    	color: #777777;
    	background: inherit;
    }
    #content #respond {
    	margin: 2em 0em 1em;
    	padding: 0em;
    	clear: both;
    }
    #sidebar {
    	margin-left: 10px;
    	width: 230px;
    	float: left;
    	min-height: 100%;
    	margin-bottom: 20px;
    	margin-top: 60px;
    	text-align: left;
    }
    #sidebar a {
    	font-size: 14px;
    }
    #sidebar h2 {
    	margin: 0em;
    	padding: 0em;
    	font-size: 14px;
    }
    #sidebar h2 a, #sidebar h2 a:visited {
    	color: black;
    	background: inherit;
    }
    #sidebar h2 a:hover {
    	color: white;
    	background: #1070c0;
    }
    #sidebar ul {
    	margin: 0em;
    	padding: 0em;
    }
    #sidebar ul li {
    	margin: 0em 0em 1em;
    	padding: 0em;
    	
    	list-style-type: none;
    }
    #sidebar ul li p, #sidebar ul li ul, #sidebar ul li ol {
    	font-size: 0.8em;
    }
    #sidebar ul li ul li, #sidebar ul li ol li {
    	margin: 0em;
    	padding: 0em;
    }
    #sidebar .textwidget {
    	font-size: 0.8em;
    }
    Code (markup):
    This is my index page:
    <?php get_header(); ?>
    
    <?php /* this is to deal with author pages */
    if(isset($_GET['author_name'])) :
    $curauth = get_userdatabylogin($author_name); // NOTE: 2.0 bug requires get_userdatabylogin(get_the_author_login());
    else :
    $curauth = get_userdata(intval($author));
    endif;
    ?>
    <div id="content">
    
    	<?php if (have_posts()) : ?>
    		
    		<?php if (!is_single() && !is_page()) echo "<h2 class=\"pagetitle\">";
    		if (is_home()) {
    			
    		} elseif (is_category()) {
    			echo 'Posts categorized &#8220;' . single_cat_title('', false) . '&#8221;';
    		} elseif (is_tag()) {
    			echo 'Posts tagged  &#8220;' . single_tag_title('', false) . '&#8221;';
    		} elseif (is_author()) {
    			echo 'Posts by ' . $curauth->nickname;
    		} elseif (is_day()) {
    			echo 'Posts from ' . get_the_time('M jS, Y');
    		} elseif (is_month()) {
    			echo 'Posts from ' . get_the_time('M Y');
    		} elseif (is_year()) {
    			echo 'Posts from ' . get_the_time('Y');
    		} elseif (is_time()) {
    			echo 'Posts from a particular time on ' . get_the_time('M, jS, Y');
    		} ;
    		if (!is_single() && !is_page()) echo "</h2>"; ?>
    
    		<?php while (have_posts()) : the_post() ?><div class="npost">
    		<div id="toppost"><h2 class="pagetitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2></div>
    		<div id="topdate"><?php the_time('jS')?><br/><?php the_time('M')?><br/><?php the_time('Y')?></div>
    		<div id="midpost">
    		<?php if (is_single() || is_page()) { /* for single-item pages, make that thing big */ ?>
    			<div class="post" id="post-<?php the_ID(); ?>">
    		<?php } else { /* otherwise, make it small since you'll have one of the headings above */ ?>
    			<div class="post" id="post-<?php the_ID(); ?>">
    				
    			<?php } ?>
    				<div class="entry">
    					<?php the_content('More... &raquo;'); ?>
    				</div>
    				
    				<?php if (is_single() || is_page()) { ?>
    					<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    				<?php } ?>
    				<p class="postmetadata">Posted by <?php the_author_posts_link(); ?> in <?php /* pages don't have categories or tags */ if (!is_page()) { ?> <?php the_category(', '); ?>. <?php /* } */?> at <?php the_time('g:i a'); ?> on <?php the_time('jS M Y')?>. <?php edit_post_link('Edit this post.', '(', ')'); ?> <?php comments_popup_link('No comments... &#187;', '1 comment... &#187;', '% comments... &#187;', 'comments-link', ''); ?><?php if (get_the_tags()) the_tags('Tags: ', ', ', '.'); ?><?php } ?></p>
    				
    		<?php comments_template(); ?>
    		</div></div><div id="botpost"></div>
    		<?php endwhile; ?>
    </div>	
    		<?php if (!is_single() && !is_page()) { ?>
    			<div class="navigation">
    						<div class="goback"><?php next_posts_link('&laquo; Back...'); ?></div>
    						<div class="goforward"><?php previous_posts_link('Forward... &raquo;'); ?></div>
    			</div>
    		<?php } ?>
    
    	<?php else : ?>
    
    		<h2>Not Found</h2>
    		<p>Sorry, but you are looking for something that isn't here.</p>
    
    	<?php endif; ?>
    </div>
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
    Code (markup):
    Could anyone help me out with this please? Thanks.
     
    Barry67, Jun 28, 2010 IP
  2. simpleloveman

    simpleloveman Guest

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Simply share the URL coz Live editing would make things much more easier.

    Thanks.
     
    simpleloveman, Jun 28, 2010 IP
  3. Asgeco

    Asgeco Member

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    May by this is your problem?

    Like simpleloveman said share URL if you need help.
     
    Last edited: Jun 29, 2010
    Asgeco, Jun 29, 2010 IP