无法使文本字段与textarea字段对齐 [英] can't get text field to align with textarea field

查看:71
本文介绍了无法使文本字段与textarea字段对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果你看一下
http://www.emrose.net /contact1.html

最后一个字段是textarea字段,我不能将它与

其他文本字段对齐。它非常接近,但这来自试用和

错误。我需要做些什么来使这些字段正确对齐并且

还剩下什么?文本输入中的size =属性是否与textarea中的cols =属性具有相同的

维度?好像它没有。

解决方案

jl **** @ alumni.princeton.edu 写道:

如果你看看
http://www.emrose.net/contact1.html

然后我认为你应该现在停止担心小的对齐问题

并首先解决实际问题。除非我在浏览器窗口加宽

,否则我看不到表单,而且只是因为

你浪费了不雅的水平空间来创建一个

大黑区。此外,现场标签非常小而难以阅读,特别是因为它们是黑色的黑色,并且它们不会被标记为< label> ;元素。而且你没有为联系人指定电子邮件

地址,所以糟糕的形式将是_ $ $
联系公司的方式;那么为什么用户会烦恼?


总之,修复页面的唯一方法就是从头开始重新设计它。

标记也是如此凌乱和浏览器依赖于任何其他方式修复



最后一个字段是textarea字段,我不能使它与
对齐其他文本字段。


你的意思是你不能让它采取相同的宽度。为什么要这样?

字段的宽度应取决于其内容,而不是取决于某些Procrustean

美学。例如,将手机字段设置为与字段一样宽的

一个人的(完整)名称是不自然的。

在文本输入中使用size =属性给出
你和textarea中cols =属性的维度相同吗?




在定义的意义上它确定了它们指定字段的宽度

(平均宽度)字符。如果字段中使用了不同的字体,物理尺寸可能会有所不同。如果你想对此做一些事情

,那么你需要CSS。但是,在你有一个有效的页面和合理的

标记之前,考虑

这样的细微差别还为时尚早。


-

Yucca, http:// www .cs.tut.fi / ~jkorpela /

关于网页创作的网页: http://www.cs.tut.fi/~jkorpela/www.html


>而且你没有为联系人指定电子邮件

地址,所以糟糕的形式将是_only_联系公司的方式;那么为什么用户会烦恼呢?
这是为了帮助减少垃圾邮件。为什么用户会烦恼? 我会

与你取得联系,但我不喜欢你的表格。 - 我只是

看不到这种情况发生,如果是这样的话,那可能是我们现在知道的更好的人。 br />
总之,修复页面的唯一方法是从
scratch重新设计它。标记太乱了,依赖于浏览器,无法以其他方式修复。



这是不对的。必须是一种方法来解决这个问题,而无需重新设计它。

从头开始。


jl **** @ alumni.princeton.edu 写道:

你不要没有指定联系人的电子邮件地址,所以糟糕的形式将是_only_联系公司的方式;那么为什么用户会烦恼呢?这样做是为了帮助减少垃圾邮件。




愚蠢。无论如何,垃圾邮件无论如何都需要保持密切。你实现了什么

给潜在客户带来了额外的麻烦。


当然,有100%肯定的方法可以摆脱垃圾邮件:disconnect
现在从互联网上
,永不返回。如果你想要不惜任何代价避免垃圾邮件,那就是你应该做的事情。

为什么用户会烦恼?


他不会。这是我的观点。

我会和你联系,但我不喜欢你的表格。


所以客户错了?此外,还有很多原因导致

形式根本不可能,而且不是喜欢或不喜欢的问题。但是你

显然不感兴趣。你甚至没有明白你要求的是什么

(除了你想要的一个非问题

变成一个小问题)不是一个HTML问题,因此在这里偏离主题。

设置一个< input>字段宽度等于< textarea>宽度是_not_

你可以用HTML做什么,我甚至告诉你为什么。

- 我只是看不到这种情况发生,如果是这样的话,这可能是我们现在知道的最好的人。




你当然发送了一条消息。

总之,修复页面的唯一方法是从头开始重新设计它。标记过于混乱,依赖于浏览器,无法以其他任何方式修复。


这是不对的。必须是一种方法来解决这个问题,而无需从头开始重新设计它。




你好像不想解决任何问题。你只想增加

的混乱。这个页面真的被设计破坏了,如果你只是坚持微调那些不需要调整的东西,那么你就浪费了每个人的时间。并且继续这样做在一个错误的小组中。


-

Yucca, http://www.cs.tut.fi/~jkorpela/

有关网页制作的网页: http://www.cs.tut.fi/~jkorpela/www.html


if you look at
http://www.emrose.net/contact1.html
the last field is a textarea field and I can''t make it align with the
other text fields. it''s pretty close, but this comes from trial and
error. what do I have to do to make these fields align both right and
left? does the size= attribute in a text input give you the same
dimension as the cols= attribute in a textarea? seems like it doesn''t.

解决方案

jl****@alumni.princeton.edu wrote:

if you look at
http://www.emrose.net/contact1.html
Then I think you should stop worrying about minor alignment issues now
and fix the real problems first. I can''t see the form unless I widen
the browser window usually and inconveniently wide, and just because
you are wasting an indecent amount of horizontal space to create a
large black area. Moreover, the field labels are horrendously small and
hard to read, especially since they are dark on black, and they aren''t
even marked up as <label> elements. And you don''t specify the E-mail
address for contacts, so the awful form would be the _only_ way to
contact the company; so why would a user bother?

In a word, the only way to fix the page is to redesign it from scratch.
The markup is far too messy and browser-dependent to be fixed in any
other way.
the last field is a textarea field and I can''t make it align with
the other text fields.
You mean you can''t make it take the same width. Why should it? The
width of a field should depend on its content, not on some Procrustean
esthetics. For example, making the phone field as wide as the field for
the (full) name of a person is unnatural.
does the size= attribute in a text input give
you the same dimension as the cols= attribute in a textarea?



It does, in the defined sense that they specify the width of the field
in (average-width) characters. The physical dimensions may vary if
different fonts are used in the fields. If you wish to do something
about this, then you would need CSS. But it''s too early to consider
such nuances before you have a page that works and has reasonable
markup.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


> And you don''t specify the E-mail

address for contacts, so the awful form would be the _only_ way to
contact the company; so why would a user bother? this was done to help reduce spam. why would a user bother? "I would
have gotten in touch with you, but I didn''t like your form." - I just
can''t see that happening, and if that were the case, it''s probably
someone we''re better off now knowing.
In a word, the only way to fix the page is to redesign it from scratch. The markup is far too messy and browser-dependent to be fixed in any
other way.


that can''t be right. must be a way to fix this without redesigning it
from scratch.


jl****@alumni.princeton.edu wrote:

And you don''t specify the E-mail
address for contacts, so the awful form would be the _only_ way to
contact the company; so why would a user bother? this was done to help reduce spam.



Foolish. Spam needs to be dealth with anyway, somehow. What you achieve
is extra trouble to potential customers.

Of course, there is a 100% sure way of getting rid of spam: disconnect
from the Internet now, and never return. That''s what you should do if
you want to avoid spam at any cost.
why would a user bother?
He won''t. That was my point.
"I would have gotten in touch with you, but I didn''t like your form."
So the customer is wrong? Besides, there are dozens of reasons why the
form simply won''t do, and it''s not a matter of like or dislike. But you
are apparently not interested. You didn''t even get the point that what
you are asking for is (besides being a non-problem that you wish to
turn into a small problem) not an HTML issue, hence off-topic here.
Setting an <input> field width equal to a <textarea> width is _not_
something you can do in HTML, and I even told you why.
- I just can''t see that happening, and if that were the case, it''s
probably someone we''re better off now knowing.



You are certainly sending quite a message.

In a word, the only way to fix the page is to redesign it from
scratch. The markup is far too messy and browser-dependent to be
fixed in any other way.


that can''t be right. must be a way to fix this without redesigning
it from scratch.



You don''t seem to want to fix anything. You just want to increase the
confusion. The page is really broken by design, and you are wasting
everyone''s time if you simply insist on fine tuning something that
needs no tuning, and keep doing that in a wrong group.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


这篇关于无法使文本字段与textarea字段对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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