htmlformswhitespacehiddenextra

HTML form with only hidden inputs create extra white space in FireFox


I have a simple form with two hidden inputs that is causing extra white space in Firefox. I've been in trouble with this for few days.

<form name="DemoForm" method="get">
<input type="hidden" name="isposted" value="">
<input type="hidden" value="2" id="SelectedTab" name="SelectedTab"></form>

It is rendered in cell. After that, there is a div with content, but in firefox there is a extra white space above the div. Only in Firefox.

I try to fix this putting the form in a div with display:none, its elements in div with "dispay:none" and other things that I have found in the net, but nothing help...

Has anyone met this issue before?


Solution

  • I have fix this issue using div container with "display:none" but removing the "type:hidden" from each element.

    The final code looks as follows:

    <div style="display:none">
        <form  name="DemoForm" method="get">
            <input name="isposted" value="">
            <input value="2" id="SelectedTab" name="SelectedTab">
        </form>
    </div>
    

    Sure, this could be useful for someone. :- ]