How to float all child divs to center inside a parent div?

Up vote 0 down vote favorite share g+ share fb share tw.

I use a parent div with three child divs , But what I get is this

How to float all those divs to center.... Hint:I dint apply any css... div float center link|improve this question asked Apr 13 '10 at 7:57Chendur Pandian6,887650150 99% accept rate.

For what its worth, I think it looks better left aligned :/ – rrrr Apr 13 '10 at 8:31.

Try this: #parentDiv { width: 600px; /* or whatever width you specify */ margin:0px auto; } . Update: Try giving margins to the pagers: #PagerUp, #PagerDown { width: 600px; /* or whatever width you specify */ margin:0px auto; } Or you can do like this too: #PagerUp, #PagerDown { width: 600px; /* or whatever width you specify */ margin-left:100px; /* adjust value accordingly */ margin-right:100px; /* adjust value accordingly */ }.

– Sarfraz Apr 13 '10 at 8:06 @sarfraz I want then to look like this img151.imageshack.us/img151/5594/centerddiv.jpg – Chendur Pandian Apr 13 '10 at 8:09 @sarfraz pager div postion in center above and below resultsdiv – Chendur Pandian Apr 13 '10 at 8:09 @Pandiya Chendur: please see my updated answer. – Sarfraz Apr 13 '10 at 8:29.

If you want to center all those div, then you must center their parent. Use margin:0 auto on #parentDiv.

Riccardo that didn't seem to work for me.. – Chendur Pandian Apr 13 '10 at 8:05.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions