You are here: Re: Width of text input box vs. password input box « HTML « IT news, forums, messages
Re: Width of text input box vs. password input box

Posted by Michael Winter on 10/31/05 13:46

On 30/10/2005 19:10, cjl wrote:

[snip]

> <div id="stealth_form">
> <form name="stealthme" action="" onSubmit="return
> initializeSearch(this);">

Why the extra block-level element (DIV)? Place the id attribute value on
the FORM, directly.

As you're passing a reference to the form to the submit event listener,
I doubt you need a name attribute.

[snip]

> #search_form
> {
> position: absolute;

Rather than absolutely-positioning the FORM and manipulating the
visibility property, position it normally (statically) and change the
display property.

[snip]

> visibility: hidden;

Hiding elements via CSS, then expecting a client-side script to be able
to reveal them, is not a good idea (unless you're operating in an
environment where browser usage is known and enforced). Hide the
elements using client-side code.

[snip]

> In IE the #stealth_form input box is 1 pixel wider, and when the
> change occurs it catches the user's eye and looks strange.

Have you considered setting the width using CSS, as well as HTML? Though
form controls are in-line, they are replaced elements so the width
property can be applied to them. Around about 9em should do.

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация