Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
图像标记和标题内容在html中不在同一行中_Html_Twitter Bootstrap - Fatal编程技术网

图像标记和标题内容在html中不在同一行中

图像标记和标题内容在html中不在同一行中,html,twitter-bootstrap,Html,Twitter Bootstrap,我想在同一行中显示图像和标题内容,但它在不同的行中出现 水质:良好 在这里: HTML: 向col-sm-12元素添加.my header类或其他内容 <div class="container"> <div class="row"> <div class="col-sm-12 my-header" align="center"> <img src="https://cdn0.iconfinder.

我想在同一行中显示图像和标题内容,但它在不同的行中出现


水质:良好
在这里:

HTML: 向col-sm-12元素添加.my header类或其他内容

<div class="container">
     <div class="row">
        <div class="col-sm-12 my-header" align="center">
             <img src="https://cdn0.iconfinder.com/data/icons/small-n-flat/24/678110-sign-info-128.png" height="40px" width="40px" />
             <h3 align="center">Water Quality  :<span id="headerValue"> Good</span></h3>
        </div>
     </div>
</div>

如果不想添加css,只需将图像放入h3中即可


水质:良好

你知道css是什么吗?检查我的答案
.my-header > img,
.my-header > h3{
  display: inline-block
}