Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Positioning Div Problems

    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:

    http://www.underoathfans.net/delete

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

    Code:
    .dropdown{
    position:absolute;
    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:

    http://www.underoathfans.net/delete/stylesheet.css

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

    Anyone help would be great.

    Thanks

    Adam.

  • #2
    New to the CF scene
    Join Date
    May 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    New Coder
    Join Date
    May 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!

  • #4
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    I don't see any navcontainer. It looks like you have changed the page again?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •