1.form不换行通过table布局实现

<table>
<tr>
<td>
<form method="get" action="left.cgi" name="WEBCAM-TEST"><input type=image src="data:images/left.jpg"/></form>
</td>
<td>
<form method="get" action="pause.cgi" name="WEBCAM-TEST"><input type=image src="data:images/pause.jpg" /></form>
</td>
</tr>
</table>

2.form不换行通过css实现

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
form{margin:0px; display:inline}
</style>
</head> <body>
<form id="form1" name="form1" method="post" action="">
<label>aaa
<input type="text" name="textfield" />
</label>
</form>
<form id="form2" name="form2" method="post" action="">
<label>
<input type="checkbox" name="checkbox" value="checkbox" />
aaa</label>
</form>
</body>
</html>

form{margin:0px; display:inline}

3.两个div并排

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>css两个div并排</title>
<style type="text/css">
<!--
.onediv{width:90px; height:50px;float:left;margin:0 0 0 5px; border:1px #000 solid; background:#FF0000}
.twodiv{width:90px; height:50px;float:left;margin:0 0 0 5px; border:1px #000 solid; background:#99CC00}
-->
</style>
</head>
<body><div class="onediv">左</div><div class="twodiv">右</div>
</body>
</html>

css两个form不换行,两个div并排代码的更多相关文章

  1. 关于模板该不该用css强制编辑器文本开头空两格

    关于模板该不该用css强制编辑器文本开头空两格这个问题,我很早之前就想说了,写惯了qq日志的童鞋都知道,qq空间的编辑器没有任何css控制,行头空两格是由用户自己控制,我写起日志又像流水账,长长的一篇 ...

  2. C#中两个Form窗口之间的传值(父->子)(子->父)

    //首先定义两个Form,一个为Form1,一个为Form2,其中Form1作为父窗口,Form2作为子窗口 //1.父窗口传值给子窗口 //Form1中代码: public Form1() { In ...

  3. egg.js 通过 form 和 ajax 两种方式上传文件并自定义目录和文件名

    egg.js 通过 form 和 ajax 两种方式上传文件并自定义目录和文件名 评论:10 · 阅读:8437· 喜欢:0 一.需求 二.CSRF 校验 三.通过 form 表单上传文件 四.通过 ...

  4. CSS + ul li 横向排列的两种方法

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  5. css中class后面跟两个类,这两个类用空格隔开

    css中class后面跟两个类,这两个类用空格隔开,那么这两个类对这个元素都起作用,如果产生冲突,那么后面的类将替代前面的类.

  6. form提供的两种数据传输方式 get和post method=”post“和method=”get”

    虽然它们都是数据的提交方式,但是在实际传输时确有很大的不同,并且可能会对数据产生严重的影响.虽然为了方便的得到变量值,Web容器已经屏蔽了二者的一些差异,但是了解二者的差异在以后的编程也会很有帮助的. ...

  7. div+css:两个div并排等高 (table-cell)

    两个div并排等高 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> < ...

  8. NO.14 两个div并排,左边为绝对宽度,右边为相对宽度

    两个div并排,左边为绝对宽度,右边为相对宽度,这个问题,我也经常遇到,我一般的处理方法是将最大的容器padding-left固定宽度,左边的固定宽度的一块position:absolute,然后ri ...

  9. 让两个Div并排显示

    一.使用display的inline属性 <div style="width:300px; height:auto; float:left; display:inline"& ...

随机推荐

  1. Show or Hide Menu List via ng-show

    <div ng-app ng-controller='MenuController'> <ul ng-show='menuState_show'> <li>Stun ...

  2. 《大话设计模式》ruby版代码:简单工厂模式

    之前有看过<ruby设计模式>,不过渐渐的都忘记了.现在买了一个大话设计模式,看起来不是那么枯燥,顺便将代码用ruby实现了一下. # -*- encoding: utf-8 -*- #运 ...

  3. Node.js express路由简单分析

    这2天看了一点node+express的路由源码有了一点眉目,总结一下 对于app.get, 首先给出一张类图: 图1 注意每个路由有一个stack,这个stack中存放了Layer. 路由系统内有三 ...

  4. poj 2631 Roads in the North

    题目连接 http://poj.org/problem?id=2631 Roads in the North Description Building and maintaining roads am ...

  5. 九度oj 1528 最长回文子串

    原题链接:http://ac.jobdu.com/problem.php?pid=1528 小白书上的做法,不过这个还要简单些... #include<algorithm> #includ ...

  6. C#中的索引

    索引代码示例:                 索引的使用示例:                       索引在经过编译器编译之后就相当于一个属性,进一步的说就是两个方法.       一个类允许 ...

  7. ubuntu14.04字符界面中文乱码及中文输入

    作为ubuntu用户字符界面是绝对不陌生的,尤其是维护管理服务器的朋友为了节省资源都是用的字符界面,但是默认字符界面中文目录文件都是乱码,根本无法打开编辑,那么怎么让字符界面显示中文目录文件,还有在字 ...

  8. ext4.1动态生成多个checkboxgroup(或者radiogroup),并且有toolbar操作、

    转载自:http://blog.csdn.net/zhengyuechuan/article/details/9327291 前台controller代码: Ext.define('zyc.contr ...

  9. mysql数据库编码设置成utf-8,避免出现乱码

    设置默认编码为utf8:set names utf8;设置数据库db_name默认为utf8:ALTER DATABASE `db_name` DEFAULT CHARACTER SET utf8 C ...

  10. Status Bar in iOS7

    This is a very important change in iOS 7: the status bar is no longer a separate bar. It’s now somet ...