今日在用css清理django做出的网页页面网页页面时,想把查寻的对话框拉长,弄成像百度搜索查寻对话框1样。結果默认设置的款式查寻对话框较为短,简易用width和height来更改form的设定,致使文字框与按钮分为了两行。查了许多材料以后,终究取得成功处理了难题。
现贴最后设定取得成功的编码:
html:
<form action="" method="get">
<input type="text" style="width:300px;height:30px"name="q">
<input type="submit" value="Search" style="height:30px;position:absolute;+margin-top:1px">
</form>
实际功效为:
style="width:300px;height:30px" 设定文字框的规格;
style="height:30px;position:absolute;+margin-top:1px" 设定按钮与文字框对齐。注:楼主应用的是IE,Firefox设定能够参照我另外一篇转载的文章内容。
css:
form{
position:relative;
left:450px;
}
功效:将表单总体右移
最终贴下取得成功的网站网页页面: