Click to See Complete Forum and Search --> : [RESOLVED] Question on Positioning?


scottpoliseno
06-06-2007, 01:22 PM
Ok....

I have a form and in Mozilla the form text box is not breaking to the next line when the text in the div tag above it wraps to the next line (divs are fixed width)...

There is the code:

<form action="http://www.domainname.com/..." method="POST" name="contactform" onSubmit="return checkFormContact(this)">
<input type="hidden" value="http://www.domainname.com/success.html" name="redirect">
<div id="formobject" align="left">Please provide us with this basic information so we can help you save your home!
<br>
Items in <b>BOLD</b> are required.</div>
<br>&nbsp;
<div id="formobject" align="left"><b>Name:</b></div>
<div id="formobject" align="left"><input type="text" name="Name" style="width:200px"></div>
<div id="formobject" align="left"><b>Address:</b></div>
<div id="formobject" align="left"><input type="text" name="Address" style="width:200px"></div>
<div id="formobject" align="left"><b>City:</b></div>
<div id="formobject" align="left"><input type="text" name="City" style="width:200px"></div>
<div id="formobject" align="left"><b>State:</b></div>
<div id="formobject" align="left"><input type="text" name="State" style="width:50px"></div>
<div id="formobject" align="left"><b>Zip Code:</b></div>
<div id="formobject" align="left"><input type="text" name="Zip_Code" style="width:100px"></div>
<div id="formobject" align="left"><b>Home Phone:</b></div>
<div id="formobject" align="left"><input type="text" name="Home_Phone" style="width:200px"></div>
<div id="formobject" align="left">Mobile Phone:</div>
<div id="formobject" align="left"><input type="text" name="Mobile_Phone" style="width:200px"></div>
<div id="formobject" align="left"><b>Email Address:</b></div>
<div id="formobject" align="left"><input type="text" name="email" style="width:200px"></div>
<div id="formobject" align="left"><b>Best Time to Call:</b></div>
<div id="formobject" align="left"><select size="1" name="Best_Time_to_Call">
<option>Morning</option>
<option>Noon</option>
<option>Afternoon</option>
<option>Evening</option>
</select></div>
<div id="formobject" align="left"><b>Is Your Home In Default?</b></div>
<div id="formobject" align="left"><input type="text" name="Default" style="width:200px"></div>
<div id="formobject" align="left"><b>Current Monthly Mortgage Payment:</b></div>
<div id="formobject" align="left"><input type="text" name="Mortgage_Payment" style="width:200px"></div>
<div id="formobject" align="left">How Many Months Behind Are Your Payments?</div>
<div id="formobject" align="left"><input type="text" name="Payments_Behind" style="width:200px"></div>
<div id="formobject" align="left">Do You Want To Keep Your Home?</div>
<div id="formobject" align="left"><select size="1" name="Keep_Your_Home">
<option>Yes</option>
<option>No</option>
</select></div>
<div id="formobject" align="left">How Much Do You Owe On Your Home?</div>
<div id="formobject" align="left"><input type="text" name="Mortage_Balance" style="width:200px"></div>
<div id="formobject" align="left">Have You Attempted To Refinance?</div>
<div id="formobject" align="left"><select size="1" name="Refinance_Attempt">
<option>Yes</option>
<option>No</option>
</select></div>
<div id="formobject" align="left">Has The Property Been Appraised Recently? (within 3 months)</div>
<div id="formobject" align="left"><input type="text" name="Appraised" style="width:200px"></div>
<div id="formobject" align="left">What is your home worth? (If not sure, give an approximate value)</div>
<div id="formobject" align="left"><input type="text" name="Home_Value" style="width:200px"></div>
<br>
<div id="formobject" align="left"><input type="submit" name="submit" value="Get Help Now!"></div>
</form>

Here is the css


#formobject
{
position:relative;
width:300px;
height:25px;
}


Thanks,

Scott

cgraz
06-06-2007, 01:46 PM
Can you post a screenshot or link? I'm not quite sure I follow the problem.

But before you do, I'd recommend changing formobject from an id to a class. An id is intended to be a unique identifier for an element; in your code you should be using it as a class and update your css from #formobject to .formobject - this could be the quirk that is causing the problem.

On another note, you could drop the align="left" in your code and just add

text-align: left;

to your .formobject definition.

scottpoliseno
06-06-2007, 02:42 PM
Man... did I have that 1000% times more complicated that I should have...

Brain fart... I was so focused on trying to make something work that I forgot to look if I even needed it...

Thanks!

cgraz
06-06-2007, 02:47 PM
So did that resolve the issue? If so, don't forget to mark this thread resolved (under Thread Tools).