自定义页眉将不加载“无法加载资源:断绝与404(未找到)状态回复”

问题描述:

我的网站是www.rosstheexplorer.com自定义页眉将不加载“无法加载资源:断绝与404(未找到)状态回复”

当设备宽度小于601px大于我想要的下面发生

  1. 我不希望有永远是菜单和 自定义标题之间的任何空间
  2. 我不希望有永远是顾客头部
  3. 我上面的任何空间不要H1,插件或任何其他c在页面上的意图重叠客户的标题
  4. 我不希望有任何空白的客户标题的左侧或右侧
  5. 我想始终能够看到整个文本'罗斯资源管理器',我不希望最后一个R被删除

请看www.nomadicmatt.com,了解我想达到的目标。

为了把自定义头在其自己的行我试着用下面的代码

<div class="row"> 

<div class="col-sm-12" style="background-color:lavender;"> 
    <div class="custom-header"></div> 
</div> 

</div> 

这似乎没有任何效果。

这里是完整的header.php代码。

<?php 
/** 
* The Header for our theme. 
* 
* Displays all of the <head> section and everything up till <div id="content"> 
* 
* @package Penscratch 
*/ 
?><!DOCTYPE html> 
<html <?php language_attributes(); ?>> 
< 

    head> 
    <meta charset="<?ph 

p bloginfo('charset'); ?>"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title><?php wp_title('A|', true, 'right'); ?></title> 
    <link rel="profile" href="http://gmpg.org/xfn/11"> 
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>"> 

    <?php wp_head(); ?> 

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> 

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384- 

     Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script 

> 


</head> 

<body <?php body_class(); ?>> 
<div id="page" class="hfeed site"> 
    <a class="skip-link screen-reader-text" href="#content"><?php _e('Skip to content', 'penscratch'); ?></a> 


    <div class="custom-header"></div> 



<header id="masthead" class="site-header" role="banner"> 
     <div class="site-branding"> 
      <?php if (function_exists('jetpack_the_site_logo')) jetpack_the_site_logo(); ?> 
      <h1 class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></h1> 
      <h2 class="site-description"><?php bloginfo('description'); ?></h2> 
     </div> 

     <nav id="site-navigation" class="main-navigation" role="navigation"> 
      <button class="menu-toggle"><?php _e('Menu', 'penscratch'); ?></button> 
      <?php wp_nav_menu(array('theme_location' => 'primary')); ?> 
     </nav><!-- #site-navigation --> 
    </header><!-- #masthead --> 

    <div id="content" class="site-content"> 
     <?php if (get_header_image()) : ?> 
      <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"> 

      </a> 
     <?php endif; // End header image check. ?> 

额外的CSS,我有以下代码

@media screen and (min-width: 75em) 
{ 
    .site { 
    max-width: 1153px; 
    margin: 400px auto; 
    padding: 54px 108px; 
    } 
} 



@media screen and (min-width: 601px) { 
.custom-header { background: url("https://i1.wp.com/www.rosstheexplorer.com/wp-content/uploads/2017/02/Cover-Photo-6-2.jpg") no-repeat; 
     width: 100% ; 
         background-size:contain; 


    } 
} 

包括新的代码,加载http://www.rosstheexplorer.com/wp-content/themes/penscratch/css/bootstrap-3.3.7.csshttp://www.rosstheexplorer.com/wp-content/themes/penscratch/js/bootstrap.min.js仍然导致404错误后(未找到)。

人们可以给我关于我可以尝试的其他代码的建议吗?

谢谢

是的,这是你的代码:

@media screen and (min-width: 601px)?custom-css=d4d401c306:9 

.custom-header { 
    background: url(https://i1.wp.com/www.rosstheexplorer.com/wp-content/uploads/2017/02/Cover-Photo-6-2.jpg) no-repeat; 

    width: 100%; 
    height: 40%; 
    background-size: cover; 
    position: absolute; 
    top: 0; 
    left: 0; 
} 

/*改变背景大小:盖;背景大小:100%; */

@media screen and (min-width: 601px)?custom-css=d4d401c306:9 

.custom-header { 
    background: url(https://i1.wp.com/www.rosstheexplorer.com/wp-content/uploads/2017/02/Cover-Photo-6-2.jpg) no-repeat; 

    width: 100%; 
    height: 40%; 
    background-size: 100%; 
    position: absolute; 
    top: 0; 
    left: 0; 
} 
+0

谢谢。 'Explorer'中的R不再被剪切,尽管客户头部和页面的其他元素之间仍有间距问题。 –

+0

您将需要在您的自定义页眉和导航栏上尝试和错误填充和边距。这是非常人口众多,所以你将很难实现这一点。也许尝试添加填充到您的网站内容,以放下您的主要容器 - 这将给你一些工作空间。 – LiffeyD

+0

我的自定义标题现在没有加载。我收到错误消息 加载资源失败:服务器响应的状态为404(Not Found) –