View Full Version : Positioning Div Problems

05-31-2007, 08:41 PM
I am stuck with a problem i cannot fix myself.

I am laying out a new site and have positioned a CSS+Javascript Drop-Down menu on the page. When i add a DIV container for my drop-down menu and add the style "top: 295px;" to obviously place it where i want it the drop-down section also moves down 295px.

Here is the page:


and the css coding for the drop down menu and container is:

visibility: hidden;
border:1px solid black;
border-bottom-width: 0;
font:normal 10px Verdana;
z-index: 100;
background-color: #000000;
width: 150px;
text-align: left;

.dropdown a{
width: 100%;
display: block;
text-indent: 2px;
padding: 0px 0;
text-decoration: none;
font-weight: bold;

.dropdown a:hover{ /*hover background color*/
background-color: #000000;
color: #FFFFFF;

.mainlink {
font-size: 12px;

.navcontainer {
position: absolute;
left: 95px;
width: 710px;
top: 295px;
text-align: center;

If needed the css for the main page is:


It contains the div layers for the other sections if needed.

Anyone help would be great.



05-31-2007, 09:46 PM
Why are you using a div within a div (class navcontainer within id header)? If you remove div id header and instead put top: 295px; within class navcontainer, I'm pretty sure it should work.

05-31-2007, 10:20 PM
Sorry, i edited and uploaded as per instruction from someone else, but it didnt work. It is up how i usually have it now with just the navcontainer.

But it still doesnt work. When i add top: 295px; to the navcontainer it affects the drop down of the menu aswell!

06-02-2007, 07:01 AM
I don't see any navcontainer. It looks like you have changed the page again?