HTML & CSS
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 ;
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
/* top: 150px;
left: 15%;/*------------15% centralizes the nested div in the above div ------------------*/
This topic is now closed. New replies are no longer allowed.