Centralize div and nested sub div does not work?

Hello guys,
I have a div, which I use as a navigation and want to nest it into a main div, which should centralize 90% of the page.

However it does not work, this is the main div

.MainNavigations {
/**/
width: 90%;
margin: 0 auto;
text-align: center;
border: solid;
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: 14px;

margin-left: auto ;
margin-right: auto ;

}

please advise

many thanks
Ehi

Hi,

Wed need to see the full html and css as the above code only tells us that you have an element set to 90% and then centred with auto margins (assuming that this is a block element).

If you are nesting this div in another element then we’d need to see the code for that element also.

Auto margins only horizontally centre block elements (that are not floated) that have a width defined (unless they are display:table).

Thanks for your reply Paul,
I sorted it out and sorry for not posting the full code, its here

The left attribute sorted it out

many thanks

div.mainmenu {
/* top: 150px;
left: 20px;/
position:absolute;
font-weight: bold;
z-index: 100;
left: 15%;/
------------15% centralizes the nested div in the above div ------------------*/

}