White bar at the top of wordpress

Asked

Viewed 623 times

1

I am riding a theme in wordpress 4.1 and am going through a problem in Chrome.

A white bar appears at the top of my layout and I am not able to remove it! Look:

inserir a descrição da imagem aqui

And when I check the Chrome Speedper, it appears as if mine header was inside the body! Half crazy this, never happened! Already in Firefox is perfect!

  • I’ve disabled the navbar wordpress on user profile
  • I activated and put the tags so it appears and did not come out!
  • I’ve tried everything else!

Man Header.php

html, body{ margin:0; padding:0;}

.container-fluid {
	margin: 0;
	padding: 0;
}
.bgHeader {
	width: 100%;
	background: #000;
	background: url(imagens/bg_header.jpg) no-repeat top center;
	height: 167px;
	background-size: cover;
}
.header-config {
	margin-top: 10px;
}
.formSearch {
	margin-top: 40px;
}
.midiasSociaisHeader {
	margin-top: 35px;
}
.midiasSociaisHeader img {
	margin-left: 15px;
}
.menu-config {
	background-image: linear-gradient(to bottom, #16b2fd, #0383f1);
	height: 60px;
	margin-top: -20px;
}
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>Tediado</title>
<link href="<?php bloginfo('template_url'); ?>/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="<?php echo get_stylesheet_uri(); ?>" rel="stylesheet">
<link rel="icon" href="../../favicon.ico">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="<?php bloginfo('template_url'); ?>/bootstrap/js/bootstrap.min.js"></script>
<!-- HTML5 shim and Respond.js para apoio IE8 de elementos HTML5 e consultas de mídia -->
<!-- WARNING: Respond.js não funcionar se você visualizar a página via arquivo:// -->
<!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<header class="bgHeader">
  <div class="container">
    <div class="row header-config">
      <div class="col-xs-3"><img src="<?php bloginfo('template_url'); ?>/imagens/logo_tediado.png" class="img-responsive center-block" alt="Logo Tediado"></div>
      <div class="col-xs-5 formSearch">
        <div class="input-group">
          <input type="text" class="form-control" placeholder="Search for...">
          <span class="input-group-btn">
          <button class="btn btn-default" type="button">Go!</button>
          </span> </div>
        <!-- /input-group --> 
        
      </div>
      <div class="col-xs-4 midiasSociaisHeader"> <img src="<?php bloginfo('template_url'); ?>/imagens/facebook.gif" class="img-responsive pull-left" alt="Facebook Tediado"> <img src="<?php bloginfo('template_url'); ?>/imagens/twitter.gif" class="img-responsive pull-left" alt="Facebook Tediado"> </div>
    </div>
  </div>
</header>

I’m wearing the bootstrap, I don’t know if he’s doing it! Someone’s been through it?

3 answers

1

Quite possibly this is because one of the files (not necessarily the header) is with the UTF-8 BOM, see this other case at Stackoverflow.

Unfortunately removing this will depend on the editor you are using, but in general you should save the file to UTF-8 without the use of BOM.

Using Phpstorm:

  1. Right-click the root folder of the site.
  2. Click on "Remove GOOD".

This will apply to all files on the site, but you can do this individually.

Using Dreamweaver:

  1. Open the document (e.g. header.php)
  2. Click on "Save As..."
  3. Click on "Unicode Options..."
  4. Keep "Include Unicode Signature (GOOD)" unchecked.
  5. Click on "OK".
  6. Save the file.

If you do not use any of these editors I suggest you look for how to remove "GOOD" with the software you use. :)

-1

In itself <body> put the parameters marginheight="0" marginwidth="0"

-2

Something similar happened on my website when logged in to admin. The problem was that I had deleted, unintentionally the wp_footer function()

Browser other questions tagged

You are not signed in. Login or sign up in order to post.