Jump to content

Float and Center


dalawh
 Share

Recommended Posts

I've used this method lots of times, and it always centres for me? it depends what html elements you are using to centre, many come with default padding, margin and even text-indent, which require you to give a zero value, to truly centre.
If you look at what they used, it is not centered. It is off to the right by a bit.
Link to comment
Share on other sites

No, it is centred to the parent container it is in, the parent container has a margin that places it approx 25px away from the left side panel, while on the right the margin is about 10px;
Wouldn't that make it not centered? You said the left margin was approx 25px and the right margin is 10px. It seems if I don't use form and use buttons instead, the text-align:center works fine.
Link to comment
Share on other sites

??? I don't know what form/buttons has to do with centring navigation menu.

Wouldn't that make it not centered? You said the left margin was approx 25px and the right margin is 10px.
The outer parent container is off centre to the white content area, the menu is centred to this outer parent container, it like comparing a car tyre being centred to the mudguard, but its not centred to the car body itself. IF i use web developer ruler it has equal distance from outer menu edges to outer parent container edges of 502px exactly.
Link to comment
Share on other sites

??? I don't know what form/buttons has to do with centring navigation menu. The outer parent container is off centre to the white content area, the menu is centred to this outer parent container, it like comparing a car tyre being centred to the mudguard, but its not centred to the car body itself. IF i use web developer ruler it has equal distance from outer menu edges to outer parent container edges of 502px exactly.
When I used a form and input, text-align:center did not work, but when I changed it to just buttons, it worked fine. Oh okay. I tried the same method and it was off a bit. Won't be needing it now, so it doesn't matter.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...