Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS NEED HELP WITH STATEMENTS

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #45781
    ScottMarshall
    Participant

    Okay guys I have a big question. I am making a navigation menu that starts 300px from the top of the screen, when I click on a link in the navigation menu that navigation menu moves to the top of the screen when the new page loads. Now the menu sits at 0px. This is good, however when the menu is at the top of the screen if the user clicks on another link I do not want the navigation menu to go back down to 300px then move up to 0px again. Instead I would like the menu to stay at 0px.

    I assume I need an if statement saying something along the lines of :

    if(#MyNavigation == 0px){
    do nothing.
    }else if(#MyNavigation ==300px){
    run function(move);
    }

    Basically I do not want a div spasm everytime the link is clicked unless they go home which will bring the navigation down to 300px. To shortform this, if the navigation is at the top stay, if the navigation is at 300px move to the top.

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.