Jump to content

Center Div Within Div And Stll Float Them


pioneerx01

Recommended Posts

I am trying to get a simple menu to have few item next to each other in the row, but still be centered with the page.

 

<div ID="parent">

<div ID="child">Menu Item 1</div><div ID="child">Menu Item 2</div><div ID="child">Menu Item 3</div>

</div>

 

How would I CSS that? I am having issues centering them on the page and keeping them next to each other at the same time.

Thanks

  • 2 weeks later...

I am trying to get a simple menu to have few item next to each other in the row, but still be centered with the page.

 

<div ID="parent">

<div ID="child">Menu Item 1</div><div ID="child">Menu Item 2</div><div ID="child">Menu Item 3</div>

</div>

 

How would I CSS that? I am having issues centering them on the page and keeping them next to each other at the same time.

Thanks

 

As above. Set the parent div to be

 

margin: 0px auto;

 

And it most definitely does work in IE!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.