Floating Search Box

Discussion in 'HTML & Website Design' started by suwandichen13, Jul 22, 2015.

  1. #1
    
    <form action="" id="test">
    <div style="background-image:url('SearchBoxWT.gif');" id="searchBox">
    <input name="q" id="Search" type="text">
    </div>
    <div id="searchButton">
    <input id="SearchBtn" style="height:49px;" class="button bigrounded"  value="search" type="submit"/>
    <div id="searchType">
    </div>
    </div>
    </form>
    
    Code (markup):
    any clue to make it float and follow the scroll? i don't have idea to do it.
     
    suwandichen13, Jul 22, 2015 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    If you want it present on the site at all times, say in the upper right corner, just make it position: fixed; in css?
     
    PoPSiCLe, Jul 22, 2015 IP
  3. suwandichen13

    suwandichen13 Well-Known Member

    Messages:
    618
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Dont understand. I not so bright.
     
    suwandichen13, Jul 22, 2015 IP
  4. suwandichen13

    suwandichen13 Well-Known Member

    Messages:
    618
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    140
    #4
    sorry wrong question. I want create search box and follow the scroll on left. Can it do it with css only?
     
    suwandichen13, Jul 22, 2015 IP
  5. mentat47

    mentat47 Greenhorn

    Messages:
    139
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    23
    #5
    To be honest, I'm not sure. You might be able to do it with JavaScript. From looking at the source code (I know a little bit about web programming) it's just a form.
     
    mentat47, Jul 22, 2015 IP
  6. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #6
    I'm wondering what's up with the multiple "DIV for nothing", lack of a FIELDSET, lack of any LABEL, endless pointless classes and ID's, static style in the markup, and other general "This is NOT how you build a form"...

    ... and have no clue what the blazes "follow the scroll on the left' even means.
     
    deathshadow, Jul 22, 2015 IP