Html 这个高度是从哪里来的?Web inspector没有';你不来吗?

Html 这个高度是从哪里来的?Web inspector没有';你不来吗?,html,css,twitter-bootstrap-3,Html,Css,Twitter Bootstrap 3,如果你看一下标题,我在右边有一个电话号码和一封电子邮件。现在由于某种原因,这两个人之间有一个空间,我完全不知道这个空间是从哪里来的 我没有填充或高度设置,web检查器只是没有为我显示它 <html> <head> <title>www.WebDesignGuy.com || Professional Website Design and Website Development Services</title> <link re

如果你看一下标题,我在右边有一个电话号码和一封电子邮件。现在由于某种原因,这两个人之间有一个空间,我完全不知道这个空间是从哪里来的

我没有填充或高度设置,web检查器只是没有为我显示它

<html>
<head>
    <title>www.WebDesignGuy.com || Professional Website Design and Website Development Services</title>
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="css/animate.css">
    <link rel="stylesheet" type="text/css" href="css/style.css">
</head>

<body>

<header>
    <div class="container">
        <div class="row">
            <div class="col-sm-6" id="logo_container">

                <img src="img/logo.png" id="top_logo">

            </div>

            <div class="col-sm-6" id="cta_header_box">

                <div id="telephone">
                    <img src="img/telephone_icon.png">
                    <p>085 816 2252</p>
                </div>

                <div id="email">
                    <img src="img/email_icon.png">
                    <p>info@webdesignguy.com</p>
                </div>

            </div>
        </div>
    </div>
</header>

<nav>
    <div class="container">
        <ul>
            <li><a href="">Home</a></li>
            <li><a href="">Testimonials</a></li>
            <li><a href="">Services</a></li>
            <li><a href="">Contact</a></li>
        </ul>
    </div>
</nav>


<script type="text/javascript" src="js/jQuery.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/script.js"></script>
</body>
</html>

此空格是因为您使用的p标记为p设置了边距0
p{margin:0;}

由于某种原因,内联元素之间有一个空格。 我建议寻找一些解决方案。 此外,您可能需要使用
display:inline块在您的img标签上


下次也请附上一把小提琴。

真的吗?这是重现问题所需的最小代码量?你是对的,我现在将做一个最小版本。只是偷懒和复制粘贴的表单项目,对不起
* {
  margin: 0;
  font-family: source sans pro;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  height: 100%;
  overflow: hidden;
}

/******* HEADER ****************** */
header {
  background-color: #057bad;
  padding-bottom: 10px;
}
header p {
  color: white;
}
header #telephone {
  margin-top: 10px;
  font-size: 31px;
  font-weight: 400;
  text-align: right;
}
header #telephone p {
  display: inline;
}
header #telephone img {
  position: relative;
  bottom: 5px;
  margin-right: 5px;
}
header #email {
  font-size: 16px;
  text-align: center;
  text-align: right;
}
header #email p {
  display: inline;
}
header #email img {
  position: relative;
  left: 3px;
  bottom: 3px;
  margin-right: 10px;
}

#top_logo {
  margin-top: 20px;
}

#cta_header_box {
  text-align: right;
}

/******* HEADER ****************** */
nav {
  background-color: #036994;
  padding: 5px 0;
}
nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
nav li {
  display: inline;
}
nav li a {
  color: white;
  text-decoration: none;
  margin-right: 30px;
  font-size: 1.2em;
}
nav li ahover {
  text-decoration: none;
  color: #057bad;
}