Overlay icon on input box

methuselah

I am trying to overlay the x icon on my grey textbox, while maintaining it's 100% width. Is this possible? And if so, how? Up until this stage, all I can do is get it to work if the width of the grey textbox is 90%.

HTML

<div class="container" id="waypoints-page">
    <div id="waypoints">
        <div class="waypoint-container">
            <input type="text" class="form-control booking waypoint" placeholder="Via" id="first-waypoint">
            <label><i class="fa fa-times" id="clear-waypoint-button"></i></label>
            <hr>
        </div>
    </div>
</div>

CSS

.booking {
    outline: none;
    border: none;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    box-shadow: none !important;
    background-color: #ccc;
}
input.form-control.booking, .twitter-typeahead {
    width:100%;
    display: inline-block;
}
.tt-dropdown-menu {
    padding: 1em;
    background-color: #ccc;
    width: 100%;

Fiddle here

user488187

Well, you can position it absolutely.

.container {
    position: relative;
}
.fa {
    position:absolute;
    top: 8px;
    right: 25px
}

See Fiddle.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Centering input box and icon button

From Dev

jQuery Datepicker icon showing below the input box instead of on the right

From Dev

Clear icon inside input text box angular way

From Dev

jQuery Datepicker icon showing below the input box instead of on the right

From Dev

Overlay of icon on bottom

From Dev

Overlay and closing a popup box

From Dev

Twitter boostrap and css: How to remove the modal overlay and refocus on the input box, so the users can type with the modal open

From Dev

Twitter boostrap and css: How to remove the modal overlay and refocus on the input box, so the users can type with the modal open

From Dev

bootstrap image hover overlay with icon

From Dev

icon overlay handlers for namespace extension

From Dev

bootstrap image hover overlay with icon

From Dev

Overlay Input on <p> or <div>

From Dev

Jquery overlay data input

From Dev

Transparent Text Box - Image Overlay

From Dev

Overlay Picture Box texture and structure

From Dev

How do I make a svg icon and a select input box vertically align in a div?

From Dev

How to Hide Firefox Camera Icon Overlay in Windows

From Dev

Add an overlay to app icon with custom launcher

From Dev

how to put overlay icon inside a textbox/textarea

From Dev

Overlay a play icon on top of thumbnail with css

From Dev

Can we register icon overlay at user level?

From Dev

how to put overlay icon inside a textbox/textarea

From Dev

set overlay Icon to running explorer without restart

From Dev

Add an overlay to app icon with custom launcher

From Dev

Which Dropbox icon is for which Icon Overlay Identifier name?

From Dev

Overlay a div on top of a input element

From Dev

Search box icon keeps disapearing

From Dev

Qt overlay(drop-up) box

From Dev

Avoid textarea content overlapping with overlay box at the bottom

Related Related

  1. 1

    Centering input box and icon button

  2. 2

    jQuery Datepicker icon showing below the input box instead of on the right

  3. 3

    Clear icon inside input text box angular way

  4. 4

    jQuery Datepicker icon showing below the input box instead of on the right

  5. 5

    Overlay of icon on bottom

  6. 6

    Overlay and closing a popup box

  7. 7

    Twitter boostrap and css: How to remove the modal overlay and refocus on the input box, so the users can type with the modal open

  8. 8

    Twitter boostrap and css: How to remove the modal overlay and refocus on the input box, so the users can type with the modal open

  9. 9

    bootstrap image hover overlay with icon

  10. 10

    icon overlay handlers for namespace extension

  11. 11

    bootstrap image hover overlay with icon

  12. 12

    Overlay Input on <p> or <div>

  13. 13

    Jquery overlay data input

  14. 14

    Transparent Text Box - Image Overlay

  15. 15

    Overlay Picture Box texture and structure

  16. 16

    How do I make a svg icon and a select input box vertically align in a div?

  17. 17

    How to Hide Firefox Camera Icon Overlay in Windows

  18. 18

    Add an overlay to app icon with custom launcher

  19. 19

    how to put overlay icon inside a textbox/textarea

  20. 20

    Overlay a play icon on top of thumbnail with css

  21. 21

    Can we register icon overlay at user level?

  22. 22

    how to put overlay icon inside a textbox/textarea

  23. 23

    set overlay Icon to running explorer without restart

  24. 24

    Add an overlay to app icon with custom launcher

  25. 25

    Which Dropbox icon is for which Icon Overlay Identifier name?

  26. 26

    Overlay a div on top of a input element

  27. 27

    Search box icon keeps disapearing

  28. 28

    Qt overlay(drop-up) box

  29. 29

    Avoid textarea content overlapping with overlay box at the bottom

HotTag

Archive