PDA

View Full Version : DD AnyLink CSS Menu Help



360
04-13-2006, 03:02 PM
AnyLink CSS Menu
http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm

Hi, i´am using the anylink css menu in my website, all works great except one thing.
I am having some trouble with aligning the menu when the page is center.

I am centering the page with the css:

body {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333333;
background: white;
WIDTH: 772px !important;
MARGIN-LEFT: auto; MARGIN-RIGHT: auto;
POSITION: relative
}

the MARGIN-LEFT: auto; MARGIN-RIGHT: auto; makes the submenu to move about 200px to the right, so it doesn´t appear below the link that "opens" it. :confused:

Can you help me?

thanks

jscheuer1
04-13-2006, 06:47 PM
The body is a special case in HTML, perhaps if you were to create a container division and give it the body's properties, things might work out. In other words, change this:


body {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333333;
background: white;
WIDTH: 772px !important;
MARGIN-LEFT: auto; MARGIN-RIGHT: auto;
POSITION: relative
}

to:


#container {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333333;
background: white;
WIDTH: 772px !important;
MARGIN-LEFT: auto; MARGIN-RIGHT: auto;
POSITION: relative
}

Then for the body of the page have:


<body>
<div id="container">
all of the page's HTML goes here
</div>
</body>

360
04-13-2006, 07:26 PM
i try it... but it doesn&#180;t work

thanks

jscheuer1
04-13-2006, 08:27 PM
To help further we would need to see your page:

Please post a link to the page on your site that contains the problematic script so we can check it out.

360
04-13-2006, 09:53 PM
i put your code but i never erase the width:772px; in the body
i only erase the part of the margins, that´s why the idea of the div #container didn´t work !!!
I correct it now, and it works!!

the website is still under construction

http://shopping.netsuite.com/c.587116/site/index.html

thanks john!!!