duanjuan3931 2014-11-20 10:35
浏览 31

改变标题二十一的大小

I would like to make the header(yellow background) smaller. As I've been told there is too much space on the header, so users have to keep scrolling to get to the content. Does that make sense? Without having to change the height of the image. As it looks strange at the moment (http://cultsotters.org.uk). Is this possible? I searched everywhere and it seems this may not be possible.

Apologies for the long post.

Css Code

#branding {border:none;}
#branding {background: #ffff88; /* Old browsers */
background: -moz-linear-gradient(top, #ffff88 0%, #ffff88 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffff88), color-stop(100%,#ffff88)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffff88 0%,#ffff88 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffff88 0%,#ffff88 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffff88 0%,#ffff88 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffff88 0%,#ffff88 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffff88', endColorstr='#ffff88',GradientType=0 ); /* IE6-9 */
margin:none;   
}
/* logo above site title */
<!-- #site-title a {
    background: url('http://www.cultsotters.org.uk/images/CultsOttersORIG.svg');
 background-size: 105px 115px;
       width: auto;

    background-repeat: no-repeat;
    background-position:top center;
    display: block;
  text-align: center;
    padding: 2.306em 0 0;
line-height:30px;
font-size:30px;
}
-->
#branding hgroup {
text-align: center; display: inline; margin:0; align:center;}
#site-title, #site-description {
    margin: ; text-align: center; 

    }
#site-title > span > a {
    line-height: 100px;

}

#site-title {
    padding: 2.306em 0 0;
}

HTML code:

<body <?php body_class(); ?>>
<div id="page" class="hfeed">
    <header id="branding" role="banner">
            <hgroup>
                <h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
                <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
            </hgroup>

            <?php
                // Check to see if the header image has been removed
                $header_image = get_header_image();
                if ( $header_image ) :
                    // Compatibility with versions of WordPress prior to 3.4.
                    if ( function_exists( 'get_custom_header' ) ) {
                        /*
                         * We need to figure out what the minimum width should be for our featured image.
                         * This result would be the suggested width if the theme were to implement flexible widths.
                         */
                        $header_image_width = get_theme_support( 'custom-header', 'width' );
                    } else {
                        $header_image_width = HEADER_IMAGE_WIDTH;
                    }
                    ?>
            <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
                <?php
                    /*
                     * The header image.
                     * Check if this is a post or page, if it has a thumbnail, and if it's a big one
                     */
                    if ( is_singular() && has_post_thumbnail( $post->ID ) &&
                            ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) &&
                            $image[1] >= $header_image_width ) :
                        // Houston, we have a new header image!
                        echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
                    else :
                        // Compatibility with versions of WordPress prior to 3.4.
                        if ( function_exists( 'get_custom_header' ) ) {
                            $header_image_width  = get_custom_header()->width;
                            $header_image_height = get_custom_header()->height;
                        } else {
                            $header_image_width  = HEADER_IMAGE_WIDTH;
                            $header_image_height = HEADER_IMAGE_HEIGHT;
                        }
                        ?>
                    <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />
                <?php endif; // end check for featured image or standard header ?>
            </a>
            <?php endif; // end check for removed header image ?>
  • 写回答

3条回答 默认 最新

  • dscuu86620 2014-11-20 10:44
    关注

    you can change height of header by using css:

    .branding {
        height: 300px;
    }
    
    评论

报告相同问题?

悬赏问题

  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据