views:

47

answers:

3

i design one form for registration of users.

in that i use tag in i use align="center"

<fieldset style="width:618.233px;" align="center">

but now problem is that in IE it run successfully.But in firefox it cant accept "align=center". it just display form bydefault(means left align)

i cant user tag because form get ugly look. what should i do?

+1  A: 

give margin : auto;

boss
hey thanks dude its workthank you very much
Pratikg88
A: 

There is no align property to the fieldset tag in html. See here.

<fieldset style="width:618.233px; text-align:center;" />
Martin
@Martin : hey dude but it works on IE.anyway i got solution from boss.
Pratikg88
There are standards, which all browsers try to work towards, and there are non-standard proprietary features which should be avoided because they *don't* work everywhere.
David Dorward
It might work in IE but it's still invalid HTML. Well at least your problem is solved. Cheers
Martin
A: 

You have two options:

  1. Align text in the center with CSS text-align property, not the whole fieldset.
  2. Give fixed width to the fieldset (you already have width:618.233px;) and add this CSS properties: margin-left: auto; margin-right: auto; or simply margin: 0 auto;
Otar