0

how can I align whole form to center?

forms

4th Jul 2016, 5:14 AM
Sabeel Ahmed
Sabeel Ahmed - avatar
8 odpowiedzi
+ 2
Ignore the deprecated 'align' property and use CSS (adjust width to suit your requirements): form { margin: 0 auto; width:450px; }
4th Jul 2016, 6:17 PM
ZinC
ZinC - avatar
+ 2
So for a responsive solution would you recommend replacing pixels with % in the CSS solution or the align property?
4th Jul 2016, 7:04 PM
Alex Harrod
+ 2
Yes, that and in combination with @media max-width and min-width. The best option if you're building a responsive design is using a framework.
4th Jul 2016, 11:28 PM
ZinC
ZinC - avatar
+ 1
Hi Zinc, fairly new to this so thought I would ask for my own learning. Does this method react to screen size?
4th Jul 2016, 6:22 PM
Alex Harrod
+ 1
It's not responsive if its fixed width is larger than the screen.
4th Jul 2016, 6:28 PM
ZinC
ZinC - avatar
+ 1
You can use <form align="center">
5th Jul 2016, 12:15 PM
Rezaul Karim
Rezaul Karim - avatar
+ 1
u can use <form align="center"> with some margin
14th Jul 2016, 4:16 AM
amol devakate
amol devakate - avatar
0
On the opening form tag use the code below. <form align="center">
4th Jul 2016, 12:02 PM
Alex Harrod