View Full Version : css center menu
amartin8
06-17-2009, 02:22 PM
i am trying to use this menu
http://www.dynamicdrive.com/style/csslibrary/item/jquery_drop_line_menu/
and have not been able to center it correctly on my page. i have tried adding auto margins to the css but it isn't responding in the manner i desired. thanks for any help
Cragdo
06-18-2009, 06:29 PM
Its hard to tell what could be wrong without seeing the code but are you sure that you are not trying to auto centre your div box inside another div that isn't centred?
Have you checked that you have the valid doc type required for this menu?
amartin8
06-18-2009, 06:50 PM
even when i just have the menu by itself with no code and mess with the css,i can't center it, that's why it is so frustrating for me. i will keep working on it though,thanks!
Cragdo
06-18-2009, 08:53 PM
Once again it is hard to know your problem without seeing your HTML or CSS code.
You could try this:
In your CSS:
body {
text-align: centre;
}
This fixes a problem with some browsers but places all your text in the centre. To solve this:
#wrapper {
margin: 0 auto;
text-align: left;
}
and your HTML:
<html>
<body>
<div id="wrapper">
All your content will be placed here...
</div>
</body>
</html>
bluewalrus
06-18-2009, 11:12 PM
It's also center not centre.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.