【问题标题】:How to align html textbox to my image?如何将 html 文本框与我的图像对齐?
【发布时间】:2016-07-18 13:18:07
【问题描述】:

如何像这样对齐它们

我的 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>

【问题讨论】:

    标签: html css web


    【解决方案1】:

    使用display:flex

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

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

    【讨论】:

      猜你喜欢
      • 2012-09-29
      • 2021-01-24
      • 1970-01-01
      • 2013-05-19
      • 2011-01-14
      • 1970-01-01
      • 2021-03-17
      相关资源
      最近更新 更多