1 reply [Last post]
mike_cors
mike_cors's picture
Offline
newbie
Birmingham
Last seen: 7 years 19 weeks ago
Birmingham
Timezone: GMT+1
Joined: 2014-09-10
Posts: 1
Points: 2

Smile
I am currently working on floating a login form

to be at the center of the page.
I used {float: center; }, which works well for most browsers, but with Firefox, it doesn't work. I knnow that Firefox doesn't have 'float: center;' and I have tried to set the left and right margins to make it center the login box. This works but the drawback with this is that because my site should be mobile responsive, when I view in a smaller resolution screen, the
doesn't remain in the center rather, it tends to be at the right position of the scree . Anyone with an idea of how to solve this ??

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 47 weeks 3 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

FF doesn't support float:center because there is no such thing

Hard to debug without any code, but here's a guess.

Set the width of the form either fixed (px) or relative (%). Then set margin: 0 auto;

That will center the form.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.