WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Centering wrap (7 posts)

  1. navyspitfire
    Member
    Posted 1 year ago #

    Don't mean to beat a dead horse, but I can't get topic to work. I've even emulated the twentyeleven theme, and it's still not working.

    header.php

    <body <?php body_class(); ?>>
    
    <div id="container">
    
    	<div id="header">
            <h1>
                <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
            </h1>
            <p><?php bloginfo( 'description' ); ?></p>
    
            <div id="access" role="navigation">
              <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
                <a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a>
                <?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
                <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
            </div><!------------------END #access ------------------------>
    
        </div> <!------------------- END #header ------------------------------>

    footer.php

    <?php
    /**
     * The template for displaying the footer.
     *
     * Contains the closing of the id=main div and all content
     * after.  Calls sidebar-footer.php for bottom widgets.
     *
     * @package WordPress
     * @subpackage Starkers
     * @since Starkers 3.0
     */
    ?>
    
    <?php
    	/* A sidebar in the footer? Yep. You can can customize
    	 * your footer with four columns of widgets.
    	 */
    	get_sidebar( 'footer' );
    ?>
    
    			<a href="<?php echo home_url( '/' ) ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
    			<a href="http://wordpress.org/" title="Semantic Personal Publishing Platform" rel="generator">Proudly powered by WordPress </a>
    
    </div> <!------------------- END #container ------------------------------>
    
    <?php
    	/* Always have wp_footer() just before the closing </body>
    	 * tag of your theme, or you will break many plugins, which
    	 * generally use this hook to reference JavaScript files.
    	 */
    
    	wp_footer();
    ?>
    
    </body>
    </html>

    style.css

    @import "css/reset.css";
    @import "css/typography.css";
    @import "css/layout.css";
    
    body {
    	background-color: gray;
    }
    
    #container {
    	width: 960px;
    	margin: 0 auto;
    }
    
    /*-------- HEADER
    ------------------------------------------------------------------------------*/
    
    #header {
    	height: 250px;
    	background-color: rgb(0,153,153);
    }
  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Which element do you want centred?
    And could you Pastebin.com the HTML from the view-source of the web page?

  3. navyspitfire
    Member
    Posted 1 year ago #

    Well, the container is gonna be centered; as it stands now it is not, everything is to the left of the screen.

    http://pastebin.com/U7KKVUTG

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Analysing your HTML, it seems you have yet to use a <div> element with the id value of "container".

  5. navyspitfire
    Member
    Posted 1 year ago #

    What about the div I declare in my header.php, right below the <body>?

  6. navyspitfire
    Member
    Posted 1 year ago #

    You know I think I found the problem... it's in Dreamweaver.

  7. navyspitfire
    Member
    Posted 1 year ago #

    Figured it out, files weren't uploading.

Topic Closed

This topic has been closed to new replies.

About this Topic