如何设置css使两个文本框显示在同一行?
如何设置css使FirstName和Email文本输入框,显示在同一行,一个在左边,一个在右边?<divclass="prayer-form"><p><label><in...
如何设置css使First Name和Email文本输入框,显示在同一行,一个在左边,一个在右边?
<div class="prayer-form">
<p><label><input class="prayer-type" type="radio" name="prayer-type" value="prayer" checked="checked" />Pray</label><label><input class="prayer-type" type="radio" name="prayer-type" value="praise" />Praise</label></p>
<textarea class="prayer-request"></textarea>
<p>First Name<input class="prayer-first-name" type="text" /></p>
<p>Email<input class="prayer-email" type="text" /></p>
<p class="prayer-submit"><a class="agreement" href="javascript: void(0);">Agreement</a><input type="button" value="Submit" /></p>
</div> 展开
<div class="prayer-form">
<p><label><input class="prayer-type" type="radio" name="prayer-type" value="prayer" checked="checked" />Pray</label><label><input class="prayer-type" type="radio" name="prayer-type" value="praise" />Praise</label></p>
<textarea class="prayer-request"></textarea>
<p>First Name<input class="prayer-first-name" type="text" /></p>
<p>Email<input class="prayer-email" type="text" /></p>
<p class="prayer-submit"><a class="agreement" href="javascript: void(0);">Agreement</a><input type="button" value="Submit" /></p>
</div> 展开
4个回答
展开全部
<div class="prayer-form">
<p><label><input class="prayer-type" type="radio" name="prayer-type" value="prayer" checked="checked" />Pray</label><label><input class="prayer-type" type="radio" name="prayer-type" value="praise" />Praise</label></p>
<textarea class="prayer-request"></textarea>
<br/>
<div style="display:inline;">
First Name<input class="prayer-first-name" type="text" />
Email<input class="prayer-email" type="text" />
</div>
<p class="prayer-submit"><a class="agreement" href="javascript: void(0);">Agreement</a><input type="button" value="Submit" /></p>
</div>
<p><label><input class="prayer-type" type="radio" name="prayer-type" value="prayer" checked="checked" />Pray</label><label><input class="prayer-type" type="radio" name="prayer-type" value="praise" />Praise</label></p>
<textarea class="prayer-request"></textarea>
<br/>
<div style="display:inline;">
First Name<input class="prayer-first-name" type="text" />
Email<input class="prayer-email" type="text" />
</div>
<p class="prayer-submit"><a class="agreement" href="javascript: void(0);">Agreement</a><input type="button" value="Submit" /></p>
</div>
追问
谢谢,如果不去掉,只用css,可以做到吗?
追答
First Name
这样。由于你div中没有再封装一层。最好在加一层div。
每一行要一个div。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<div class="prayer-form">
<p><label><input class="prayer-type" type="radio" name="prayer-type" value="prayer" checked="checked" />Pray</label><label><input class="prayer-type" type="radio" name="prayer-type" value="praise" />Praise</label></p>
<textarea class="prayer-request"></textarea>
<br/>
<div style="display:inline;">
First Name<input class="prayer-first-name" type="text" />
Email<input class="prayer-email" type="text" />
</div>
<p class="prayer-submit"><a class="agreement" href="javascript: void(0);">Agreement</a><input type="button" value="Submit" /></p>
</div>
<p><label><input class="prayer-type" type="radio" name="prayer-type" value="prayer" checked="checked" />Pray</label><label><input class="prayer-type" type="radio" name="prayer-type" value="praise" />Praise</label></p>
<textarea class="prayer-request"></textarea>
<br/>
<div style="display:inline;">
First Name<input class="prayer-first-name" type="text" />
Email<input class="prayer-email" type="text" />
</div>
<p class="prayer-submit"><a class="agreement" href="javascript: void(0);">Agreement</a><input type="button" value="Submit" /></p>
</div>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你好,代码如下:
<div class="prayer-form">
<p><label><input class="prayer-type" type="radio" name="prayer-type" value="prayer" checked="checked" />Pray</label><label><input class="prayer-type" type="radio" name="prayer-type" value="praise" />Praise</label></p>
<textarea class="prayer-request"></textarea>
<br/>
<div style="display:inline;">
First Name<input class="prayer-first-name" type="text" />
Email<input class="prayer-email" type="text" />
</div>
<p class="prayer-submit"><a class="agreement" href="javascript: void(0);">Agreement</a><input type="button" value="Submit" /></p>
</div>
<div class="prayer-form">
<p><label><input class="prayer-type" type="radio" name="prayer-type" value="prayer" checked="checked" />Pray</label><label><input class="prayer-type" type="radio" name="prayer-type" value="praise" />Praise</label></p>
<textarea class="prayer-request"></textarea>
<br/>
<div style="display:inline;">
First Name<input class="prayer-first-name" type="text" />
Email<input class="prayer-email" type="text" />
</div>
<p class="prayer-submit"><a class="agreement" href="javascript: void(0);">Agreement</a><input type="button" value="Submit" /></p>
</div>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询