2013-08-29 16 views
0

http://charlestonduilawfirm.com/移除報頭和渦卷以外頁腳,現在有麻煩造型標誌

客戶端想要的頭以跨越頁面的寬度。看起來我能夠部分地做到這一點,但是頁眉背景顏色並沒有一直延伸到整個頁面。此外,徽標在內容邊欄換行的邊界之外運行。

當瀏覽器窗口展開時,如何在整個頁面上擴展背景顏色,同時仍然將標題內容鎖定在內容/邊欄上方達到一定寬度後?通常情況下,我使用已經具備此功能的主題,並且只處於編碼的早期階段,所以我在此處對CSS失去了興趣。這是我現在在自定義CSS文件中的內容。

#header { 
    height: 110px; 
    background-color: #055792; 
    } 

    #header .widget-area { 
    float: right; 
    width: 30%; 
    } 

.header-image #title-area, .header-image #title, .header-image #title a { 
     height: 110px; 
     width: 70%; 
     background: url("http://charlestonduilawfirm.com/wp-content/themes/executive/images/logo.png") left no-repeat; 
     } 

此外,這裏是functions.php。是否可能由於與註釋自定義標題衝突導致全部效果未註冊?

<?php 
/** Start the engine */ 
require_once(get_template_directory() . '/lib/init.php'); 

load_child_theme_textdomain('executive', apply_filters('child_theme_textdomain', get_stylesheet_directory() . '/languages', 'executive')); 

/** Child theme (do not remove) */ 
define('CHILD_THEME_NAME', __('Executive Theme', 'executive')); 
define('CHILD_THEME_URL', 'http://www.studiopress.com/themes/executive'); 

/** Add Viewport meta tag for mobile browsers */ 
add_action('genesis_meta', 'executive_add_viewport_meta_tag'); 
function executive_add_viewport_meta_tag() { 
    echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>'; 
} 

/** Add support for custom background */ 
add_theme_support('custom-background'); 

/** Add support for custom header */ 
add_theme_support('genesis-custom-header', array(
    'width'  => 1140, 
    'height' => 100 
)); 

/**Remove support for custom header*/ 
remove_theme_support('genesis-custom-header'); 

/** Sets Content Width */ 
$content_width = apply_filters('content_width', 680, 680, 1020); 

/** Create additional color style options */ 
add_theme_support('genesis-style-selector', array(
    'executive-brown' => __('Brown', 'executive'), 
    'executive-green' => __('Green', 'executive'), 
    'executive-orange' => __('Orange', 'executive'), 
    'executive-purple' => __('Purple', 'executive'), 
    'executive-red'  => __('Red', 'executive'), 
    'executive-teal' => __('Teal', 'executive'), 
)); 

/** Unregister layout settings */ 
genesis_unregister_layout('content-sidebar-sidebar'); 
genesis_unregister_layout('sidebar-content-sidebar'); 
genesis_unregister_layout('sidebar-sidebar-content'); 

/** Unregister secondary sidebar */ 
unregister_sidebar('sidebar-alt'); 

/** Add new image sizes */ 
add_image_size('featured', 285, 100, TRUE); 
add_image_size('portfolio', 300, 200, TRUE); 
add_image_size('slider', 1140, 445, TRUE); 

/** Remove the site description */ 
remove_action('genesis_site_description', 'genesis_seo_site_description'); 

/** Relocate the post info */ 
remove_action('genesis_before_post_content', 'genesis_post_info'); 
add_action('genesis_before_post_title', 'genesis_post_info'); 

/** Customize the post info function */ 
add_filter('genesis_post_info', 'post_info_filter'); 
function post_info_filter($post_info) { 
    if (!is_page()) { 
     $post_info = ' 
     <div class=\'date-info\'>' . 
      __('posted on', 'executive') . 
      ' [post_date format="F j, Y" before="<span class=\'date\'>" after="</span>"] ' . 
      __('by', 'executive') . ' [post_author_posts_link] [post_edit] 
     </div> 
     <div class="comments"> 
      [post_comments] 
     </div>'; 
     return $post_info; 
    } 
} 

/** Change the default comment callback */ 
add_filter('genesis_comment_list_args', 'executive_comment_list_args'); 
function executive_comment_list_args($args) { 
    $args['callback'] = 'executive_comment_callback'; 

    return $args; 
} 

/** Customize the comment section */ 
function executive_comment_callback($comment, $args, $depth) { 

    $GLOBALS['comment'] = $comment; ?> 

    <li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>"> 

     <?php do_action('genesis_before_comment'); ?> 

     <div class="comment-header"> 
      <div class="comment-author vcard"> 
       <?php echo get_avatar($comment, $size = $args['avatar_size']); ?> 
       <?php printf('<cite class="fn">%s</cite> <span class="says">%s:</span>', get_comment_author_link(), apply_filters('comment_author_says_text', __('says', 'executive'))); ?> 
       <div class="comment-meta commentmetadata"> 
        <a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>"><?php printf('%1$s ' . __('at', 'executive') . ' %2$s', get_comment_date(), get_comment_time()); ?></a> 
       <?php edit_comment_link(__('Edit', 'executive'), g_ent('&bull; '), ''); ?> 
       </div><!-- end .comment-meta --> 
      </div><!-- end .comment-author -->   
     </div><!-- end .comment-header --> 

     <div class="comment-content"> 
      <?php if ($comment->comment_approved == '0') : ?> 
       <p class="alert"><?php echo apply_filters('genesis_comment_awaiting_moderation', __('Your comment is awaiting moderation.', 'executive')); ?></p> 
      <?php endif; ?> 

      <?php comment_text(); ?> 
     </div><!-- end .comment-content --> 

     <div class="reply"> 
      <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> 
     </div> 

     <?php do_action('genesis_after_comment'); 

    /** No ending </li> tag because of comment threading */ 

} 

/** Create portfolio custom post type */ 
add_action('init', 'executive_portfolio_post_type'); 
function executive_portfolio_post_type() { 
    register_post_type('portfolio', 
     array(
      'labels' => array(
       'name' => __('Portfolio', 'executive'), 
       'singular_name' => __('Portfolio', 'executive'), 
      ), 
      'exclude_from_search' => true, 
      'has_archive' => true, 
      'hierarchical' => true, 
      'menu_icon' => get_stylesheet_directory_uri() . '/images/icons/portfolio.png', 
      'public' => true, 
      'rewrite' => array('slug' => 'portfolio'), 
      'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'genesis-seo'), 
     ) 
    ); 
} 

/** Change the number of portfolio items to be displayed (props Bill Erickson) */ 
add_action('pre_get_posts', 'executive_portfolio_items'); 
function executive_portfolio_items($query) { 

    if($query->is_main_query() && !is_admin() && is_post_type_archive('portfolio')) { 
     $query->set('posts_per_page', '12'); 
    } 

} 

/** Add support for 3-column footer widgets */ 
add_theme_support('genesis-footer-widgets', 3); 

/** Register widget areas **/ 
genesis_register_sidebar(array(
    'id'   => 'home-slider', 
    'name'   => __('Home - Slider', 'executive'), 
    'description' => __('This is the slider section on the home page.', 'executive'), 
)); 
genesis_register_sidebar(array(
    'id'   => 'home-top', 
    'name'   => __('Home - Top', 'executive'), 
    'description' => __('This is the top section of the home page.', 'executive'), 
)); 
genesis_register_sidebar(array(
    'id'   => 'home-cta', 
    'name'   => __('Home - Call To Action', 'executive'), 
    'description' => __('This is the call to action section on the home page.', 'executive'), 
)); 
genesis_register_sidebar(array(
    'id'   => 'home-middle', 
    'name'   => __('Home - Middle', 'executive'), 
    'description' => __('This is the middle section of the home page.', 'executive'), 
)); 

/** Move header and footer outside the wrap */ 
remove_action('genesis_header', 'genesis_do_header'); 
add_action('genesis_before', 'genesis_do_header'); 
remove_action('genesis_footer', 'genesis_do_footer'); 
add_action('genesis_after', 'genesis_do_footer'); 

我想這是一個常見問題,但在Google或搜索功能方面沒有太大的成功。任何幫助將不勝感激。

+0

這個帖子看看,也許它可以幫助你的頭問題:POST(http://stackoverflow.com/q/18435028/2714670) – gespinha

回答

0

添加width: 100%;並添加顏色。當前背景是一張圖片。這裏的CSS和顏色需要

.header-image #title-area, .header-image #title, .header-image #title a { 
height: 100px; 
width: 100%; 
background: #055792 url("http://charlestonduilawfirm.com/wp-content/themes/executive/images/logo.png") left no-repeat; 
} 
+0

謝謝。我很感激幫助。既然我已經在你的這個主題上看到了你,你能指出我正確的方向關於標題右小部件區域嗎? Id喜歡它顯示在標題中,與內容邊欄上方左側對齊。 – Jon