Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form stopping and starting half way down the page in IE

Status
Not open for further replies.

junglist666

Technical User
Mar 9, 2006
25
GB
http://heathrowminicab.com/minicab-booking.htm

this form is split into a left and right div

in firefox, the form looks fine..
in IE, the form starts on the left.. and on the right div it carries on from where the left form finishes...

why is this..

my page form is simple and set out like this..

<div id="wrap">

<div id="bleft">
<form>
blabla
</div>

<div id="bright">
blabla
</form>
</div>

</div>

here are the settings for my divs in the stylesheet

Code:
div#wrap {width:750px; position:absolute; left:50%; margin: 0 0 0 -375px;
border:1px solid #666666; padding:0; background:#ffffff;}

div#bleft {width:374px; background:#fff; float:left; text-align:left;}

div#bright {width:374px; background:#fff; float:right; text-align:left;}

any ideas??
 
Your markup is very clearly malformed. You cannot open a form inside one div, and then close that containing div without first closing the form.

You must close all child containers before closing the parents.

Hope this helps,
Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
so what do you suggest...

should i close my form in the left div.. and then re open it on the right one...

will the form still work, and will the browser know its the same form..?
 
ive actually just reduced the width of the form elements, and now the page looks fine and the form does work.. so i think its ok...

wot you think.. check it now.
 
I think you need to wrap the form around both divs. The point of the form element is that it contains form elements and that's about it. So there's no reason why you couldn't wrap your form around both divs or even around the entire page for that matter.
 
You can't split forms while treating them as one without using some sort of scripting. I'd advise against this.

As Vragabond says, if you need to modify your markup, the easiest thing to do would be to put your open and close form tags at the top and bottom of the page, respectively.

Dan




[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top