WordPress.org

Ready to get started?Download WordPress

Forums

Container background repeating or extending (5 posts)

  1. pylorns
    Member
    Posted 3 years ago #

    For some reason my container it not working correctly as the background is cut off - see code exmaples below - I hope this is a quick fix thanks in advance, been trying to fix this all day.
    http://www.highcountrysmokers.com/wp/

    */
    
    body,td,th {
    	color: #FFFFFF;
    }
    body {
    	background-color: #3e150f;
    	margin-left: 0px;
    	margin-top: 0px;
    	margin-right: 0px;
    	margin-bottom: 0px;
    }
    #container {
    width:1024px;
    height:auto;
    margin:auto;
    background:url(images/background.jpg);
    background-repeat:repeat-y;
    }
    
    #header {
    margin:auto;
    width:1024px;
    height:358px;
    
    }
    #content {
    width:724px;
    float:left;
    font-family:Georgia, "Times New Roman", Times, serif;
    font-size:12px;
    }
    #sidebar {
    width:280px;
    float:right;
    padding-left:20px;
    
    }
    #footer {
    width:1024px;
    clear:both;
    }
    
    .post-date{
    float: left;
    display: inline;
    margin: 0 10px 0 10px;
    font-family:Geneva, Arial, Helvetica, sans-serif;
    background: url(images/bbq_date.png) no-repeat;
    height:200px;
    width:52px;
    }
    .month {
    padding-top:78px;
    padding-left:5px;
    }
    .day {
    font-size:25px;
    padding-left:3px;
    }
    
    /* Word press fonts */
    .post {
    font-family:Georgia, "Times New Roman", Times, serif;
    font-size:12px;
    }

    Header:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    <head profile="http://gmpg.org/xfn/11">
    	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    	<title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <link rel="shortcut icon" href="favicon.png" />
    <link rel="shortcut icon" href="favicon.ico" />
    <style type="text/css" media="screen">
    </style>
    
    	<?php wp_head(); ?>
    	<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    
    </head>
    <body>
    <div id="container">
      	<div id="header"></div>
    <!-- END Header -->

    main index

    <?php get_header(); ?>
    <div id="content">
      	<?php if (have_posts()) : ?>
    		<?php while (have_posts()) : the_post(); ?>
    			<div <?php post_class() ?>>
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    
              		<div class="post-date">
    			  		<div class="month"><?php the_time('M') ?></div>
               			<div class="day"><?php the_time('d') ?></div>
    	  			</div>
                <div class="entry">
    					<?php the_content('Read the rest of this entry &raquo;'); ?>
    			</div>
    
    				<div class="meta">
    					<div class="bg">
    						<span class="comments-num"><?php comments_popup_link('No Comments', '1 Comment', '% Comments') ?></span>
    						<p>Posted <!-- by <?php the_author_link() ?> --> in <?php the_category(', ') ?></p>
    					</div>
               		</div>
    
           <?php endwhile; ?>
    		<?php if(function_exists('wp_pagenavi')) : wp_pagenavi();  else :?>
    			<div class="navigation">
    				<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    				<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    			</div>
    		<?php endif ?>
    
    	<?php else : ?>
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.</p>
    		<?php get_search_form(); ?>
    	<?php endif; ?>
    
    	<?php get_sidebar(); ?>
    <?php get_footer(); ?>
  2. Glenn Ansley
    Member
    Posted 3 years ago #

    It looks like you're missing a </div> right before the <?php endwhile; ?> in your main index file.

  3. pylorns
    Member
    Posted 3 years ago #

    Welp, just addded that div in and no dice.. anyone see anything else that looks wonky?

  4. khiangte
    Member
    Posted 3 years ago #

    Looks like you are missing one </div> between <?php endif; ?> and <?php get_sidebar(); ?>, I check out your blog, SIDEBAR AND FOOTER are inside #content, this your html structure
    '
    <div id="container">
    <div id="header"></div>
    <div id="content">
    <div class="post-"></div>
    <div class="post-"></div>
    ?????
    <div id="sidebar"></div>
    <div id="footer"></div>

    </div>

    // this should be put in above ???
    </div>'

    I think this will help you :

    '
    <div id="container">
    <div id="header"></div>
    <div id="content">
    <div class="post-"></div>
    <div class="post-"></div>
    </div>

    <div id="sidebar"></div>
    <div id="footer"></div>

    </div>'

  5. pylorns
    Member
    Posted 3 years ago #

    That was it! much thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic