更新时间:2022-06-02 08:46:35
HTML更改 - 在< img> $ c $之前移动
< div id =header-login>
c> -
HTML changes - move <div id="header-login">
before the <img>
-
<div id="header-login">
<form id="header-login-form">
<input name="username" type="text" placeholder="Username" class="header-login-form-field">
<input name="password" type="password" placeholder="Password" class="header-login-form-field">
<input name="submit" type="image" src="images/tellerest-homepage-design_05.png">
</form>
</div>
<img src="images/tellerest-homepage-design_02.png" alt="">
浮动是这样有趣的,浮动本身应该主要出现在代码之前的内容旁边
Floats are funny this way, the float itself should mostly appear in the code before the content beside which it floats.
CSS更改 - 添加 float:right
到#header- login
。将 vertical-align:bottom
添加到所有输入
,或 vertical-align: / code>到输入字段,因为每个输入字段的隐式默认值可能不同。
CSS changes - add float: right
to #header-login
. Add vertical-align: bottom
to all input
there, or vertical-align: top
to the input fields, because each of them likely varies in its implicit default value of that property.