You need to set an explicit CSS width of less than 100% the size of its containing block for the <div> in order for the 'margin:0 auto' to have any effect.
01-03-2013, 06:25 PM
evenstar7139
Thanks for the reply. Anyhoo, I tried this and nothing happened:
<div style="width: 500px; margin: 0 auto;">
Then I tried this, to see what would happen, and it changed the with of the area AROUND the captcha but didn't touch the captcha itself:
<div style="width: 900px; margin: 0 auto;">
Maybe the DIV style isn't getting applied to the captcha?
01-03-2013, 09:26 PM
LearningCoder
Have you got a live example at all? It's strange because using width and margin auto generally will center things.
Is there anything else which could affect the styles for the <div>? For example is that <div> inside another <div>? Could be an inheritance problem?
Regards
01-03-2013, 09:31 PM
LearningCoder
Do you want your captcha centered within that div, not the actual div itself to be centered?
Just looked at the code and the <div> is centering, but the captcha is aligned to the left.
I'm guessing you want the captcha centered?
01-03-2013, 09:37 PM
LearningCoder
Sorry for re-posting but cannot seem to edit my previous post.
I think you should check your code once again because I think you want to centeried your
captcha but in your code you are doing that captcha's <div> centerized.. so, I think you
should correct it first..