Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter willpower1

    (@willpower1)

    You can wrap the form and cart-contents in a div (or similar), and give it these attributes:

    width: 960px;
    margin: 0 auto;

    These attributes are from your style.css on line 144. So you could also give your new div a class from one of those listed on line 144.

    OR

    You could throw it all in your #header .col-full div.

    Then you can tinker with padding/margins as needed.

    It looks like you’ve made changes to the header.php file that’s created some major mark-up errors:

    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.thewattletree.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

    You should definitely get those sorted out.

    You’re also using a commercial theme, so WooThemes would be the place for support questions –

    http://www.woothemes.com/products/simplicity/

    Thread Starter willpower1

    (@willpower1)

    Ok I am getting there. Thanks for the help.

    Also Woothemes does not cover this type of customization.

    The problem I have is that the search box is left even though I have it wrapped in a custom Div which is right aligned.

    Here’s my code for the header.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html <?php language_attributes(); ?>>
    <head profile="http://gmpg.org/xfn/11">
    
    <title><?php woo_title(); ?></title>
    <?php woo_meta(); ?>
    <?php global $woo_options; ?>
    
    <link rel="stylesheet" type="text/css" href="<?php bloginfo( 'stylesheet_url' ); ?>" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php if ( $woo_options[ 'woo_feed_url' ] ) { echo $woo_options['woo_feed_url']; } else { echo get_bloginfo_rss( 'rss2_url' ); } ?>" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    
    <?php wp_head(); ?>
    <?php woo_head(); ?>
    
    </head>
    
             </div>
    
    <body <?php body_class(); ?>>
    <?php global $woocommerce; ?>
    
    <?php woo_top(); ?>
    
    <div id="wrapper">
    
    	<?php if ( function_exists( 'has_nav_menu') && has_nav_menu( 'top-menu' ) ) { ?>
    
    	<h1>&nbsp;</h1>
    	<div id="top">
    		<div class="col-full">
    
    			<?php wp_nav_menu( array( 'depth' => 6, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'top-nav', 'menu_class' => 'nav fl', 'theme_location' => 'top-menu' ) ); ?>
    	  </div>
    </div><!-- /#top -->
    
        <?php } ?>
    
        <div id="custom">
    	<?php global $woocommerce; ?>
    
    <a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'woothemes'); ?>"><?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?> - <?php echo $woocommerce->cart->get_cart_total(); ?></a><form role="search" method="get" id="searchform" action="http://www.thewattletree.com/">
    <div><label class="screen-reader-text" for="s">Search for:</label>
    <input type="text" value="" name="s" id="s">
    <input type="submit" id="searchsubmit" value="Search">
    </div>
    </form>
         <div>
    	<div id="header-container"> 
    
    		<div id="header" class="col-full">
    
    			<div id="logo">
    
    			<?php if ($woo_options[ 'woo_texttitle' ] <> "true") : $logo = $woo_options['woo_logo']; ?>
    				<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'description' ) ); ?>">
    					<img src="<?php if ( $logo ) echo esc_url( $logo ); else { echo esc_url( get_template_directory_uri() . '/images/logo.png' ); } ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" />
    				</a>
    	        <?php endif; ?> 
    
    	        <?php if( is_singular() && !is_front_page() ) : ?>
    				<span class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></span>
    	        <?php else : ?>
    				<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo('name' ); ?></a></h1>
    	        <?php endif; ?>
    				<span class="site-description"><?php bloginfo( 'description' ); ?></span>
    
    			</div><!-- /#logo -->
    
    			<div id="navigation" class="fr"> 
    
    				<div class="nav">
    
    				<?php
    				if ( function_exists( 'has_nav_menu' ) && has_nav_menu( 'primary-menu' ) ) {
    					wp_nav_menu( array( 'depth' => 6, 'sort_column' => 'menu_order', 'container' => 'ul', 'theme_location' => 'primary-menu' ) );
    				} else {
    				?>
    		        <ul>
    					<?php
    		        	if ( isset( $woo_options['woo_custom_nav_menu'] ) AND $woo_options['woo_custom_nav_menu'] == 'true' ) {
    		        		if ( function_exists( 'woo_custom_navigation_output' ) )
    							woo_custom_navigation_output();
    
    					} else { ?>
    
    			            <?php if ( is_page() ) $highlight = 'page_item'; else $highlight = 'page_item current_page_item'; ?>
    			            <li class="<?php echo esc_attr( $highlight ); ?>"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php _e( 'Home', 'woothemes' ); ?></a></li>
    			            <?php
    			    			wp_list_pages('sort_column=menu_order&depth=6&title_li=&exclude='); 
    
    					}
    					?>
    		        </ul>
    		        <?php } ?>
    		      	</div><!-- /.nav -->
    
    		    </div><!-- /#navigation -->
    		    <div class="fix"></div>
    
    		</div><!-- /#header -->
    </div><!-- /#header-container -->
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Alignment issue’ is closed to new replies.