标头溢出约20px

时间:2017-03-08 13:05:48

标签: php html css wordpress header

我在基于CMS WordPress的学校项目(餐厅网站)上工作,但是我的标题有问题,有一些约20-19px的溢出,我不知道如何解决它。

我无法为标题设置固定大小,因为它无法正常导航菜单,min-height也不能正常工作。

有人可以帮我解决这个问题吗?我没有太多时间来完成这个项目,我还有很多工作要做:)网址是http://restaurant.g6.cz/menu/

Image shows the problem here                 / 标题 /

    header .heading {
      display: block;   
      width: 100%;
      height: 300px;    
      background-repeat: no-repeat;}   


    .slider{
      display: block;
      width: 100%;
      height: 300px;    
      position: absolute;
    }

      /*Horizontal menu*/

    header nav{
        width: 100%;
        background-color: #232323;
        display: table;

    }

    header nav ul{
        background-color: #232323;
        overflow:hidden;
        color:white;
        padding:0px;
        text-align:center;
        list-style-type: none;
        margin:0px;
        transition: max-height 0.4s;
        -webkit-transition: max-height 0.4s;
        -ms-transition: max-height 0.4s;
        -moz-transition: max-height 0.4s;
        -o-transition: max-height 0.4s;
    }

    header nav ul li{
        display:table-cell;
        padding: 15px 0px 15px 0px;
        border-right: 1px;
        border-right-style:solid;
        border-right-color: #333333;
        vertical-align: middle;
        font-weight: bold;


        }

    header nav ul li a{
        font-size: 100%;
        text-decoration: none;
        color: white;
        padding: 15px 20px 16px 20px;
    }

    header nav ul li:hover{
    background-color: #171717;
    }

    header nav ul li a:hover {
    color: #DDAF4D;
    }

    header nav ul li.current-menu-item {
    background: #171717;
    }

    header nav ul li.current-menu-item a {
    color: #DDAF4D;
    }


    .menupozmenseni {
    width: 100%;
    background-color: #171717;
    text-align:left;
    box-sizing: border-box;
    /*padding: 15px 10px;   */
    height: 49px;
    cursor: pointer;
    color: white;
    display:none;
    background-image:url(obrazky/menu.png);
    background-repeat:no-repeat;
    background-position: center;
    }

    @media screen and (max-width: 968px) {

    header nav ul{
        max-height: 0px;
    }

    header nav ul li {
    box-sizing:border-box;
    width: 100%;
    padding: 0px;
    display:block;
    }

    header nav ul li a{
    display:block;
    margin: 0px;
    padding: 15px 0px 16px 0px;
    }

    .menupozmenseni{
        display:block;

        }

    .skryteprvkymenu{
        max-height: 450px; 
        -webkit-transition: max-height 0.8s;
        -ms-transition: max-height 0.8s;
        -moz-transition: max-height 0.8s;
        -o-transition: max-height 0.8s;
        }


    }
    </style>





    <header>


        <div class="heading">
                <div class="slider">

      <?php if (is_page($page = 'menu' )){ ?>
      <?php echo do_shortcode('[smartslider3 slider=6]'); ?>

      <?php }   elseif (is_page($page = 'vinny-listek' )){ ?>
      <?php echo do_shortcode('[smartslider3 slider=7]'); ?>

      <?php }else{ ?>
      <?php echo do_shortcode('[smartslider3 slider=5]'); ?>

      <?php } ?>

      </div>
      <div class="site-branding">
                <?php if ( is_front_page() || is_home() ) : ?>
                    <div class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></div>
                <?php else : ?>
                    <div class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></div>
                <?php endif;

                $description = get_bloginfo( 'description', 'display' );
                if ( $description || is_customize_preview() ) : ?>
                    <div class="site-description"><?php echo $description; ?></div>
                <?php endif; ?>
           </div>

      <div class="nadpis">
      <a href="<?php the_permalink();?>"><?php the_title();?></a>
      </div>


        </div>

        <nav class="site-nav">

            <?php

            $args = array(
                "theme_location" => "primary"
            );

            ?>

            <?php
                wp_nav_menu($args);
            ?>

    <div class="menupozmenseni"></div>     

        </nav>

    <script>
    $( ".menupozmenseni" ).on( "click", function() {
        $("header nav ul").toggleClass("skryteprvkymenu");
    });
</script>

    </header>

1 个答案:

答案 0 :(得分:0)

如果您在标题内看到了检查员,则会找到此字符串CodeGenerators.Mvc。查看截图,亲自查看。这就是造成额外空白区域的原因,删除它并且你很好! Determining what a CFTypeRef is?