Floating Google Searchbox?

Discussion in 'HTML & Website Design' started by abcdefGARY, Jun 22, 2006.

  1. #1
    Hello, I need some help and was curious as anyone on Digital Point has the answer...

    I'd like to make a floating Google searchbox. Most of the tutorials online I found taught you how to make a floating "menu". Floating as in it will appear all the time.

    If you don't know what I'm talking about... Here's a pic:

    [​IMG]

    thanks in advance!
     
    abcdefGARY, Jun 22, 2006 IP
  2. schmidte

    schmidte Peon

    Messages:
    345
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    schmidte, Jun 22, 2006 IP
  3. abcdefGARY

    abcdefGARY Well-Known Member

    Messages:
    665
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Does Firefox support this script? It works fine in IE though, thanks.

    Edit: Hmm, I did a little research and it seems that Firefox does not support iFrames. Is there another solution without using iFrames?
     
    abcdefGARY, Jun 22, 2006 IP
  4. sgtsloth

    sgtsloth Peon

    Messages:
    205
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    sgtsloth, Jun 22, 2006 IP
    abcdefGARY likes this.
  5. RichardRosse

    RichardRosse Peon

    Messages:
    96
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You can do this with a <div> and some CSS:
    set the 'position' property to 'absolute'
    and set the 'top' and 'left' fields to the place you want it...

    then use the <body onscroll=...> event to update the position.
     
    RichardRosse, Jun 23, 2006 IP
  6. abcdefGARY

    abcdefGARY Well-Known Member

    Messages:
    665
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #6
    Thanks very much! Works great in Firefox and IE.
     
    abcdefGARY, Jun 23, 2006 IP
  7. mscwd

    mscwd Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Couldn't use just place it in a DIV and ue CSS to position it within the window frame. Oh... as Richard suggested ^

    That'd be the best solution and wouldn't require loads of JS to achieve it.
     
    mscwd, Jun 24, 2006 IP