afrika — 2013-03-24T06:29:11-04:00 — #1
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
margin: 0 auto;
font-family: Verdana, Geneva, Tahoma, sans-serif;
margin-left: auto ;
margin-right: auto ;
paulob — 2013-03-24T08:38:48-04:00 — #2
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).
afrika — 2013-03-24T10:19:09-04:00 — #3
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
/* top: 150px;
left: 15%;/*------------15% centralizes the nested div in the above div ------------------*/