1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

menu remains on top at the screen while scolling.

Discussion in 'HTML & Website Design' started by Hans van Hasselt, Dec 31, 2016.

  1. #1
    Hello I'm dutch so do not pay too much attention on my writing style. The website I'm building by using HTML and CSS. Has a header image across the screenwidth and 250px high underneath is the menu bar. Now I want as you scroll down the header image moves above to the top menu bar remains on the screen. An example of what I mean is the following website balireisen.info or happy-size.nl as far as I can see both are built with wordPress. I manage to let the header and the menu on top of the screen by using, "position: fixed;" but that is not the intention. I understand that there is a standard java script but I am certainly not because I'm not familiar with java. that why i ask for this script.looking forward to your reactions
     
    Hans van Hasselt, Dec 31, 2016 IP
  2. mmerlinn

    mmerlinn Prominent Member

    Messages:
    3,197
    Likes Received:
    818
    Best Answers:
    7
    Trophy Points:
    320
    #2
    Since you are looking for a Java solution you would probably get more and better help on other forums that specialize in Java programming. DP has no forums pertaining to Java programming.
     
    mmerlinn, Dec 31, 2016 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    I believe the OP is referring to javascript; a common error being to conflate the two languages. @ the OP, Java is a different language from Javascript. Javascript is the common scripting language for client side web pages.

    gary
     
    kk5st, Dec 31, 2016 IP
  4. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #4
    qwikad.com, Dec 31, 2016 IP
  5. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #5
    A bit simplified version. The html/css are messy, you may want to clean everything up. I found both codes online, not responsible for any mess:

    https://fiddle.jshell.net/xJXZr/125/


     
    qwikad.com, Dec 31, 2016 IP