Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox automatically closing an HTML element too early - IE and Chrome OK

Tags:

html

php

firefox

Can anyone tell me why Firefox would close a form early by adding a </form>? It closes the form well before the submit button - so the form then won't submit.

The whole code for the form is a bit long to post here. It works fine in Chrome and IE, but Firefox seems to close the form early and removes the later </form>.

The html is being output from PHP. Not sure if this would make a difference?

Editing in firebug doesn't work either. Any ideas appreciated.

Thanks

like image 266
logic-unit Avatar asked Dec 05 '22 22:12

logic-unit


1 Answers

When a browser closes a form or div unexpectedly, it's usually because there's some kind of mistake in the code - like a closing div instead of an opening one.

I suggest you feed your code to the w3c Validator, and fix the errors.

like image 191
kikito Avatar answered Dec 10 '22 09:12

kikito