如何将html文本框与我的图像对齐?

时间:2016-07-18 05:03:50

标签: html css html5 css3 web

如何与他们保持对齐

enter image description here

我的HTML代码

<div id="headerlogo">
    <a href="http://localhost/absolutevc/index.html">
      <img id="logo" src="images\logo.jpg" height="69" width="250">
    </a>
    <input id="search" type="text" placeholder="Search Keywords" name="search" size="50px">
</div>

1 个答案:

答案 0 :(得分:0)

使用display:flex

#headerlogo{
  display:flex;
  align-items: center;
}

这是我的小提琴代码:https://jsfiddle.net/nz0exkez/