Re: Forms and Netscape -- spacing problem -- Help!

From: Date: Mon, 22 Oct 2001 06:40:27 +0000
Subject: Re: Forms and Netscape -- spacing problem -- Help!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-71795@lists.php.net to get a copy of this message
> form tag in NS (4x - 6x) there is some additional space The form tag is a block level tag, thus white space will be appended after the closing tag. To avoid this, I use a style on the form element. I do this for both IE and Navigator, in different ways, as I've found they seem to react differently to the required CSS. For Navigator, in the style sheet, .form { display: inline; } and in the HTML, <form class="form" method="post"> and for IE, in the style sheet, form { display: inline; } and in the HTML, <form method="post"> I prefer using PHP to send the correct style and HTML dependent on the user agent, but you can incorporate the two - in the style sheet, form, .form { display: inline; } and in the HTML, <form class="form" method="post"> and IE will ignore the bits it doesn't do, as will Navigator. Hope that helps. Regards James

« previous php.general (#71795) next »