tags:

views:

39

answers:

5

I am having a constant trouble with pages not rendering correctly between FF and IE. not my code below. "Select an Account" should be next to the drop down such as: Select an Account Type: "then my form" however my form goes to the next line when I want it next to "Select an Account". In IE it renders correctly in FF it does not.

<p><b><strong>Select an Account Type
<FORM NAME="myform">
<SELECT NAME="mylist">
<OPTION VALUE="traditional">Traditional Account
<OPTION VALUE="paperless">Paperless Account

</SELECT>
</FORM></b></strong></p>
+2  A: 

That markup is seriously hideous. Anyway, your problem is that <form> elements are (according to the standards) block elements. To fix this, use the following CSS:

form { display: inline; }
Felix
A: 

form is a block element and should break to a new line ..

you should set its display to inline display:inline with css if you want it to continue in the same line as the text..

Gaby
A: 

A good testing tool is http://litmusapp.com as it allows you to see how a page will render in different browsers.

In your particular case, you need to close your option tags to create a proper dropdown box.

<option name="x">whatever</option>
swt83
Thanks, I didn't know litmusapp before. You can get a similar service for free at http://browsershots.org/.
codescape
I closed the options tag, Thank you!
Michael
A: 

The problem is that the text "Select an Account Type" is "outside" the FORM element. And the FORM element has default margins and padding applied by the browser.

I suggest this code instead

<form name="myform">
<label for="mylist"><strong>Select an Account Type</strong></label> <select id="mylist" name="mylist"><option value="traditional">Traditional Account</option>
<option value="paperless">Paperless Account</option></select>
</form>

Hope this helps

Karinne
for the 'for' attribute to work on the label the select element needs an 'id' attribute. you can also nix the for attribute and wrap the label element around the select element.
Samuel
Oops! Yes thank you for that.
Karinne
Thanks that worked fine...I appreciate your help.
Michael
You're welcome!
Karinne
+1  A: 

welcome to xhtml...STOP USING CAPS IT HURTS MY EYES.

<form name="myform">
<label for="mylist">Select an Account Type</label>
<select id="mylist" name="mylist">
<option value="traditional">Traditional Account</option>
<option value="paperless">Paperless Account</option>
</select>
</form>
Samuel