PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.html > form in row, row too high
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
form in row, row too high

Réponse
 
LinkBack Outils de la discussion
Vieux 22/04/2008, 01h14   #1
John Smith
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut form in row, row too high

One of the rows in a table is twice as high as others. I trace the
problem to the following code. If I remove everything between <form> and
</form>, the row would have a regular height. If I put anything in
between, even the word "test", suddenly, the row height doubles.

Anyway to cure the problem?

=============================================
<form>
<font size=2 color="#aa3f30">search</font>

<select >
<option value="sci" selected >web</option>
<option value="sciencenow" >Daily News</option>
<option value="sigtrans" >Science</option>
<option value="sageke" >search</option>
<option value="scirecruit">Careers</option>
<option value="searchall">All Journals</option>
</select>
<input type="text" name="fulltext" value="" size="10" title="Enter
your search terms">
<input type="image" name="search_submit" value="go" src="go.gif"
alt="Go" ><font size=1 color=blue><u> Advanced</u></font>
</form>
  Réponse avec citation
Vieux 22/04/2008, 01h45   #2
Beauregard T. Shagnasty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: form in row, row too high

John Smith wrote:

> One of the rows in a table


What table?

> is twice as high as others. I trace the problem to the following code.


Post a URL, not a code fragment, especially one not showing what is
broken.

--
-bts
-Friends don't let friends drive Vista
  Réponse avec citation
Vieux 22/04/2008, 08h29   #3
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: form in row, row too high

On 2008-04-22, John Smith <jsmith@company.com> wrote:
> One of the rows in a table is twice as high as others. I trace the
> problem to the following code. If I remove everything between <form> and
></form>, the row would have a regular height. If I put anything in
> between, even the word "test", suddenly, the row height doubles.
>
> Anyway to cure the problem?


Possibly the default bottom margin on form of about 1em that some
browsers give you in quirks mode.

Set form { margin: 0 }, and use strict mode anyway.

You get strict mode by starting all pages with:

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

Post a URL.
  Réponse avec citation
Vieux 23/04/2008, 00h47   #4
John Smith
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: form in row, row too high

Thanks for the replies.

The problem is, indeed, like what Ben said, form margin. Browsers tend
to leave blank spaces before and after forms. This usually would not be
a problem but when the form is in a table, this would double the row height.

The solution is to set the form margin to zero.

The following site has a detailed explanation.

http://www.cs.tut.fi/~jkorpela/forms/extraspace.html
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 14h08.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13676 seconds with 12 queries