textarea没有被div包围 [英] textarea not enclosed by div

查看:68
本文介绍了textarea没有被div包围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个带有文本输入,textarea和按钮的表单。


- - - - - - - - - - - - - - - - - - - - - - - - 样本表格

< div style =" color = blue; border:dashed blue">

< div id =" subject">对于批量电子邮件:< br />主题:< input type =" text"

name =" bulk_subject"大小= QUOT; 60" />

< / div>

< div id =" paper">

< textarea rows =" 25 QUOT; COLS = QUOT; 65 QUOT; name =" bulk_letter">

< / textarea>

< / div>


< div style =" background-color:#aa0000;填充:15px 45px 15px 25px;">

< button type =" submit"名称= QUOT;功能" value =" bulk_email" />发送

批量电子邮件< / button> & nbsp;

< / div>

< / div>

- - - - - - - - - - - - - - - - - - - - - - - - - - - 结束样本


问题是包含的div就好像textarea只是

1线高。例如:底部按钮位于textarea下面并且

虚线绕过它就好了,但是在textarea下,如果textarea只有一个,那么你会想到
行。


我可以通过定位按钮div来解决这个问题,但这不安全。


我做错了什么?

(与MSIE和Mozilla相同)


-

账单

技术服务系统

bill(atsign)TechServSys(期间)com


unix是用户友好的,它只是小心它是谁的朋友

I want to have a form with a text input, a textarea and a button.

- - - - - - - - - - - - - - - - - - - - - - - - sample form
<div style="color=blue; border: dashed blue">
<div id="subject">For a Bulk Email:<br />Subject: <input type="text"
name="bulk_subject" size="60" />
</div>
<div id="paper">
<textarea rows="25" cols="65" name="bulk_letter">
</textarea>
</div>

<div style="background-color: #aa0000; padding: 15px 45px 15px 25px;">
<button type="submit" name="function" value="bulk_email"/>Send a
bulk email</button> &nbsp;
</div>
</div>
- - - - - - - - - - - - - - - - - - - - - - - - - - -- end sample

The problem is that the containing div acts as if the textarea were only
1 line high. eg: the bottom button is under the textarea and the
dashed line goes around it just fine, but under the textarea, where you
would expect if the textarea were only one row.

I can workaround by positioning the button div, but that is not safe.

what am I doing wrong ?
(it is the same with MSIE and Mozilla)

--
bill
Technical Service Systems
bill (atsign) TechServSys (period) com

unix is user friendly, it is just careful who it befriends

推荐答案

bill写道:


< snip>
bill wrote:

<snip>
我在做什么错了?




相当多。 HTML和

CSS中有更多语法错误。通过验证器运行代码: http://validator.w3.org/ (如那个

应该收回你的大部分错误,包括我怀疑是你的问题造成的错误。


-

David Dorward http://dorward.me.uk/



Quite a lot. You have more then a few syntax errors in both the HTML and the
CSS. Run the code though the validators: http://validator.w3.org/ (as that
should pick up most of your errors, including the one I suspect is causing
your problem).

--
David Dorward http://dorward.me.uk/


David Dorward写道:
David Dorward wrote:
bill写道:

< snip>
bill wrote:

<snip>
我做错了什么?



相当多。 HTML和CSS中有更多的语法错误。通过验证器运行代码: http://validator.w3.org/ (如
应该收集你的大部分错误,包括我怀疑导致你的问题的错误。)


Quite a lot. You have more then a few syntax errors in both the HTML and the
CSS. Run the code though the validators: http://validator.w3.org/ (as that
should pick up most of your errors, including the one I suspect is causing
your problem).



非常感谢你。代码验证为4.01严格。

以下是经过验证的完整列表。

它仍有问题,您可以通过将其粘贴到
中来检查
页面,验证它并查看它。

!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 // EN"

" ; http://www.w3.org/TR/html4/strict.dtd">

< html>

< head>


< meta http-equiv =" Content-Type"含量=" text / html的; charset = iso-8859-1">

< title>搜索结果< / title>

<! -

pagename = hoh_bulk_results

description =显示搜索结果的右手页

person

- >


< style type =" text / css">

<! -

body {background-color:#00FfaA;

颜色:黑色;

font-family:" times new roman",serif;

font-size:medium;

}

td {font-weight:bold;}

#paper {

position:absolute;

背景颜色:白色;

颜色:黑色;

字体重量:粗体;

身高:430px;

宽度:560px;

边框:纯蓝色;

保证金:20px 0px;

}

#subject {

颜色:黑色;

字体大小:0.9em;

font-weight:bold;

保证金:30px 0px 30px 0px;

}


- >

& lt; / style>

< / head>

< body>

< form action =" dumy">

< div style =" color = blue; border:dashed blue">

< div id =" subject">对于批量电子邮件:< br />主题:< input type =" text"

name =" bulk_subject"大小= QUOT; 60" />

< / div>

< div id =" paper">

< textarea rows =" 25 QUOT; COLS = QUOT; 65 QUOT; name =" bulk_letter">

< / textarea>

< / div>


< div style =" background-color:#aa0000;填充:15px 45px 15px 25px;">

< button type =" submit"名称= QUOT;功能" value =" bulk_email" />发送

批量电子邮件< / button> & nbsp;

< / div>

< / div>

< / form>

< / body>

< / html>


-

bill

技术服务系统

bill(atsign)TechServSys(期间)com


unix用户友好,它只是小心它是谁的朋友


Thank you very much. The code validates as 4.01 strict.
Here is the complete listing that validated.
It still has the problem, which you may check by pasting this into a
page, validating it, and looking at it.
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Search Results</title>
<!--
pagename=hoh_bulk_results
description=Right hand page to display the results of searching for one
person
-->

<style type="text/css">
<!--
body {background-color: #00FfaA;
color: black;
font-family: "times new roman", serif;
font-size: medium;
}
td {font-weight: bold;}
#paper {
position: absolute;
background-color: white;
color: black;
font-weight: bold;
height:430px;
width:560px;
border: solid blue;
margin: 20px 0px;
}
#subject {
color: black;
font-size:0.9em;
font-weight:bold;
margin: 30px 0px 30px 0px;
}

-->
</style>
</head>
<body>
<form action="dumy">
<div style="color=blue; border: dashed blue">
<div id="subject">For a Bulk Email:<br />Subject: <input type="text"
name="bulk_subject" size="60" />
</div>
<div id="paper">
<textarea rows="25" cols="65" name="bulk_letter">
</textarea>
</div>

<div style="background-color: #aa0000; padding: 15px 45px 15px 25px;">
<button type="submit" name="function" value="bulk_email"/>Send
a bulk email</button> &nbsp;
</div>
</div>
</form>
</body>
</html>

--
bill
Technical Service Systems
bill (atsign) TechServSys (period) com

unix is user friendly, it is just careful who it befriends


bill写道:

代码验证为4.01严格。

它仍有问题,您可以通过将其粘贴到
页面进行检查,验证并查看它。


如果是测试页的网址呢?我们更有可能查看

我们的浏览器和在线验证器已经可以使用的东西。

!DOCTYPE HTML PUBLIC" - // W3C / / DTD HTML 4.01 // EN"
" http://www.w3.org/TR/html4/strict.dtd">
< html>
< head>

The code validates as 4.01 strict.

It still has the problem, which you may check by pasting this into a
page, validating it, and looking at it.
How about a url to a test page instead? We''re more likely to look at
something that''s already available to our browsers and online validators.
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>




[代码剪辑]


-

Brian

按照我的地址中的说明给我发电子邮件



[code snipped]

--
Brian
follow the directions in my address to email me


这篇关于textarea没有被div包围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆