css两个form不换行,两个div并排代码

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

<table>
 <tr>
  <td>
   <form method="get" action="left.cgi" name="WEBCAM-TEST"><input type=image src="images/left.jpg"/></form>
  </td>
  <td>
   <form method="get" action="pause.cgi" name="WEBCAM-TEST"><input type=image src="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>
时间: 2024-12-22 03:56:53

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

CSS如何实现段落开头缩进两个汉字

CSS如何实现段落开头缩进两个汉字: 在写文章的时候,一般在一个新的段落开始需要空两个汉字空格.下面就介绍一下如何使用CSS实现此种效果. 代码如下: <!DOCTYPE html>  <html>  <head>  <meta charset=" utf-8">  <meta name="author" content="http://www.51texiao.cn/" /> <

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

两个div并排等高 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title></title> 6 <style> 7 .left, 8 .right { 9 display: table-cell; 10 border: 1px solid #f40; 11 } 12 </style> 13 </hea

让两个DIV并排显示

一.使用display的inline属性 1 <div style="width:300px; height:auto; float:left; display:inline">AAAA</div> 2 <div style="width:300px; height:auto; float:left; display:inline">BBBB</div> 二.通过设置float来让Div并排显示 1 <style

利用颜色和形态学两种方法进行车牌区域提取的OpenCV代码

要想提取车牌号,首先你要定位车牌区域嘛,本文分别两种方法用,即颜色和形态学的方法,对车牌区域进行判定.说得是两种方法,其实两种方法并无多大的区别,只是有一步的判断标准不一样而已,你看了下面整理出的的思路就知道两者的区别真的很小了. 方法一:利用颜色提取车牌区域的思路: ①求得原图像的sobel边缘sobelMat ②在HSV空间内利用车牌颜色阈值对图像进行二值化处理,得到图像bw_blue→ ③由下面的判别标准得到图像bw_blue_edge for (int k = 1; k != heigh

两个DIV并排显示

今天做的一个项目,需要做3个div,一个是总框(Div1),另外两个是子框,按比例填满div1,我设置好两个div的width和height,发现效果是两个子div上下显示,如图所示: 要想将两个DIV并排显示,需要用到float属性,将div2的float设置为left,将div3的float设置为right,运行就达到了想要的效果 值得一提的是,如果div2和div3的width值相加等于DIV1的width值得话,div2和div3依旧是上下排布而非并列排布 代码示例如下: <%@ pag

创建两个线程模拟火车站两个窗口售票程序

题目:创建两个线程模拟火车站两个窗口售票程序,窗口售票时间为1秒,两个窗口不能同时售票 #include<Windows.h> #include<iostream> using namespace std; //这是2个线程模拟买火车票的小程序 DWORD WINAPI Fun1Proc(LPVOID lpParameter);//thread data DWORD WINAPI Fun2Proc(LPVOID lpParameter);//thread data int inde

我和EDAS这两年——阿里巴巴入职两年的小结

我和EDAS这两年 --阿里巴巴入职两年的小结 写作中...

给定两个字符串,获取两个字符串中最大相同的子串

1 package weekpratisce; 2 3 ///给定两个字符串,获取两个字符串中最大相同的子串 4 public class Demo9 { 5 public static void main(String[] args) { 6 String xx = "aaaaaaaaaaddddddd", yy = "45ddddda"; 7 String str = getMaxsubstring(xx, yy); 8 System.out.println(s

去掉两个最高分、去掉两个最低分,求平均分

static void Main47求平均分(string[] args) { //去掉两个最高分,去掉两个最低分,求平均分 Console.WriteLine("请输入分数的个数:"); int a = Convert.ToInt32(Console.ReadLine()); int [] fs = new int [a]; if (a < 5) { Console.WriteLine("输入的分数至少为5个!"); } else { for (int i