Home > Web Front-end > HTML Tutorial > 请教一下, 这个span怎么就换行了呢_html/css_WEB-ITnose

请教一下, 这个span怎么就换行了呢_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:39:07
Original
1187 people have browsed it

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>    <title></title></head><body><form class="pass_reg_form" id="pass_reg_form" action="" method="post"><p class="pass_reg_p_email" id="pass_reg_p_email"><label class="pass_reg_label_email" id="pass_reg_label_email">My e-mail address: </label><input class="pass_reg_input_email" id="pass_reg_email" type="text" name="email" autocomplete="off" tabindex="1"/><span class="pass_reg_err_email" id="pass_reg_email_err" style="display:block">Please enter an email address</span></p></form></body></html>
Copy after login


我是想让 please enter an email address出现在input栏的右边, 可是用chrome测试是出现在另外一行了, 求帮助


回复讨论(解决方案)

设置span的display 比如display:inline

把label里的style="display:block"去掉就行了

display = block
block此元素将显示为块级元素,此元素前后会带有换行符。
写成style="display:"就可以了

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template