Jump to content
dalawh

Float and Center

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
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;

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...