Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7935221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:51:22+00:00 2026-06-03T21:51:22+00:00

Essentially I’m trying to create the HTML/CSS for an auto-complete. I want it to

  • 0

Essentially I’m trying to create the HTML/CSS for an auto-complete. I want it to look/behave roughly like the one here: http://www.skyscanner.com/ (type into From or To fields)

I’m not worrying about actually making the auto-complete work, I just want to create the HTML/CSS that it would use to show the list of text items generated by the auto-complete.

This is the basic layout I’m hoping to make:

enter image description here

Input box 1 and Input box 2 are what I currently have. When the user clicks in one of these input boxes, I want the corresponding auto-complete box (which at this point will show fake data) to appear.

Unfortunately I can’t think of how I would do something like this. Can anyone get me started or point me in the right direction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:51:25+00:00Added an answer on June 3, 2026 at 9:51 pm

    The basic idea is to have a parent element that is positioned relatively to the page, but without moving it. Since this element is positioned (not static), you can position the suggest box absolutely relative to the parent element, under the text box. Since it is positioned absolutely, it does not affect document flow, a.k.a. it appears over other elements that are below the text box. Something like this should work:

    HTML:

    <span class="tbSuggestParent">
    <input type="text" class="tbSuggest">
    <span class="suggestions"><!-- Suggestions go here --></span>
    </span>
    

    CSS:

    .tbSuggestParent {
        position: relative;
        display: inline-block;
    }
    
    .tbSuggest {
        width: 200px;
        height: 30px;
        font-family: Arial;
        font-size: 14pt;
        border: 2px solid black;
        border-radius: 2px;
    }
    
    .suggestions {
        position: absolute;
        width: 170px;
        height: 300px;
        top: 36px;
        left: 15px;
        border: 1px solid black;
        border-radius: 2px;
        display: inline-block;
        background-color: white;
    }
    

    This includes rounded borders as your image seems to show, using border-radius. If that property is not available in a given browser, it should just use regular borders.

    Demo (includes text underneath): http://www.dstrout.net/pub/suggest.htm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Essentially what I want to do is to apply additional CSS classes to individual
Essentially what I want to do is select the most recent message between one
Essentially here I want the modal form sheet to be transparent so I can
Essentially, I would like to create a database structure that allows for classifying an
Essentially, I have a dynamically generated local HTML form that I would like to
Essentially I want to take a list of things like... a 345 b 762
Essentially I want to be able to do something like: a = Integer(1) a
Essentially what I'm trying to do is fairly simple....pass more than one parameter (4
Essentially I want to create a script to deploy a database connection script to
Essentially, I want to be able to do something like this: struct Foo {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.