• Resolved jt101

    (@jt101)


    Hi

    My website is http://www.thebreadcrumbtrail.org. On the lefthand side you’ll see my sidebar. I think the error is obvious. The links seem to be poking out to the side. I just can’t find a way to get them back inline.

    It only happened when I added : “margin-left: 60px;” to the sidebar ul, as you can see below.
    I’m adding my homepage & sidebar code aswell at the bottom………Thanks in advance!

    Style.CSS:

    /* Sidebar Links */
    #sidebar ul {
    	width: 215px;
    	background: #93865b;
    	padding: 40 0 0 0;
    	list-style-type: none;
    	margin-left: 60px;
    }
    #sidebar ul h3 {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	background: url(images/sidebar_title_bg.jpg) #b8ad89 no-repeat left top;
    	padding-left: 25px;
    	line-height: 25px;
    	color: #fff;
    	font-size: 1.8em;
    }
    #sidebar ul li {
    	margin: 20px 0 25px 0;
    }
    #sidebar ul ul {
    	padding: 0 0 0 0;
    }
    #sidebar ul ul li {
    	margin: 3px 0;
    	padding: 5px 0 5px 30px;
    	font-size: 1.2em;
    	background: #b8ad89 no-repeat left 10px;
    
    }
    #sidebar ul ul li a {
    	background: url(images/sidebar_li.gif) no-repeat left 4px;
    	padding-left: 14px;
    	color: #fff;
    
    }
    #sidebar ul ul li a:hover {
    	color: #c40;
    }

    Sidebar code:

    <?php /* Local File */ ?>
    
    <!-- sidebar start -->
    	  <div id="sidebar">
    			<p>&nbsp;</p>
    			<p>&nbsp;</p>
    			<p>&nbsp;</p>
    			<p>&nbsp;</p>
    			<p>&nbsp;</p>
    
    		<div class="intro">
    
    			<?php if (is_page('home')) { ?> <?php $post_id = 41;
    				$queried_post = get_post($post_id); echo $queried_post->post_content;?> <?php } ?>
    			<?php if (is_home()) { ?> <?php $post_id = 173;
    				$queried_post = get_post($post_id); echo $queried_post->post_content;?> <?php } ?>
    			<?php if (is_page('Travel Guides')) { ?> <?php $post_id = 95;
    				$queried_post = get_post($post_id); echo $queried_post->post_content;?> <?php } ?>
    			<?php if (is_page('ESE Travel')) { ?> <?php $post_id = 180;
    				$queried_post = get_post($post_id); echo $queried_post->post_content;?> <?php } ?>
    			<?php if (is_page('Gallery')) { ?> <?php $post_id = 183;
    				$queried_post = get_post($post_id); echo $queried_post->post_content;?> <?php } ?>
    			<?php if (is_page('Crumbs About Us')) { ?> <?php $post_id = 175;
    				$queried_post = get_post($post_id); echo $queried_post->post_content;?> <?php } ?>
    			<?php if (is_page('Links')) { ?> <?php $post_id = 301;
    				$queried_post = get_post($post_id); echo $queried_post->post_content;?> <?php } ?>
    
    			<p>&nbsp;</p>
    			<p>&nbsp;</p>
    			<p>&nbsp;</p>
    			<p>&nbsp;</p> 
    
    		</div>
    
    			<div id="sidebar_top"></div>
    			<ul>
    			<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Sidebar') ) : ?>
    				<li>
    					<h3>Categories</h3>
    					<ul>
    						<?php wp_list_cats('sort_column=name&optioncount=0&hierarchical=0'); ?>
    					</ul>
    				</li>
    				<li>
    					<h3>Archives</h3>
    					<ul>
    						<?php wp_get_archives('type=monthly'); ?>
    					</ul>
    				</li>
    
    				<li>
    					<h3>Meta</h3>
    					<ul>
    						<?php wp_register(); ?>
    						<li><?php wp_loginout(); ?></li>
    						<li><a href="http://validator.w3.org/check/referer">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li>
    						<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
    						<?php wp_meta(); ?>
    					</ul>
    				</li>
    			<?php endif; ?>
    			</ul>
    	  </div>
    <!-- sidebar end -->

    Homepage code:

    <?php
    /*
    Template Name: homepage
    */
    ?>
    
    <?php get_header(); ?>
    
    <!-- container start -->
    	<div id="container">
    <?php get_sidebar(); ?>
    
    <!-- content start -->
    
    	<div id="content">
    		<div class="post_top_frame"></div>
    
    		<?php $temp_query = $wp_query; ?>
    			<?php query_posts("showposts=1"); ?>
     				<?php while (have_posts()) : the_post(); ?>  
    
    				<div class="post" id="post-<?php the_ID(); ?>">  
    
    					<span style="color: "#b31414"; font-size: 26px; font-family: Tw Cen MT;">Latest Breadcrumb Blog Post</span>
    
    					<p>&nbsp;</p>
    
        					<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    					<span style="color: #fff; font-size: 16px; font-weight: bold; font-family: Helvetica;"><?php the_title(); ?></span></a> 
    
    					<p>&nbsp;</p>
    					<p>&nbsp;</p>
    
    				<div class="post_date">
    					<?php the_time('d') ?>
    					<?php the_time('M') ?>
    
    				</div>									
    
    					<?php $image = get_post_meta($post->ID, "home", true); ?>
    
      					<?php the_excerpt(); ?>
    
    					<span style="color: "#b31414"; font-size: 14px; font-weight: bold; font-family: Helvetica;"><a class="more-link" href="http://localhost/wordpress/?page_id=9">More Crumbs >></span></a>
    
    					<p>&nbsp;</p>
    
    					<?php edit_post_link('<p><h3><font color="#15317E"><b>Edit this entry </b></font></h3></p>', '<p>', '</p>'); ?>
    
    					<?php endwhile; ?> 			
    
    					<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
    					<p>&nbsp;</p>
    
    	</div>  <?php /* content div */ ?>			
    
    		<div class="homepagestatic">
    
    			<p>&nbsp;</p>
    			<p>&nbsp;</p>
    			<p>&nbsp;</p> 
    
    			<?php
    			$post_id = 68;
    			$queried_post = get_post($post_id);
    			echo $queried_post->post_content;?>
    
    			<p>&nbsp;</p>
    
    			<?php edit_post_link('<p><h3><font color="#15317E"><b>Edit this entry </b></font></h3></p>', '<p>', '</p>'); ?>	
    
    			<p>&nbsp;</p>
    			<p>&nbsp;</p>
    			<p>&nbsp;</p>
    			<p>&nbsp;</p>
    			<p>&nbsp;</p> 
    
    			<?php
    			$post_id = 71;
    			$queried_post = get_post($post_id);
    			echo $queried_post->post_content;?>
    
    			<p>&nbsp;</p>
    
    			<?php edit_post_link('<p><h3><font color=#15317E><b>Edit this entry </b></font></h3></p>', '<p>', '</p>'); ?>
    		</div>	<?php /* homepagestatic div */ ?>
    
    		<div class="post_bottom_frame"></div>
    
    </div>	<?php /* sidebar div */ ?>
    
    </div>	<?php /* container div */ ?>
    
    </div>	<?php /* header div */ ?>
    
    <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
  • Thread Starter jt101

    (@jt101)

    I had to add the following to bring it back inline:
    #sidebar ul ul {
    padding: 0 0 0 0;
    display: inline;

Viewing 1 replies (of 1 total)

The topic ‘Sidebar elements not inline’ is closed to new replies.