logo
down
shadow

Responsive full width input with button


Responsive full width input with button

By : Ravindra
Date : November 21 2020, 11:01 PM
like below fixes the issue What I typically do for that sort of layout is make a parent container around the elements (like you have) and give it position: relative and width: 100%.
Then I use position: absolute and display: inline-block on the inner elements. Set the width for the fixed-sized elements and use left or right to position all of the elements.
code :


Share : facebook icon twitter icon
Responsive Design: how to have text input and button stay 100% width of parent

Responsive Design: how to have text input and button stay 100% width of parent


By : JasonXia
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , UPDATE (The Flexbox Way!)
The proper way to achieve this now is with Flexbox!
code :
    /* CSS
    **************************************************************************/

    /* Reset */
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body { margin: 1rem; }
    h2 { margin: 2rem 0 0; }


    /* Flexbox Example */
    .flexbox { display: flex; }
    .flexbox .stretch { flex: 1; }
    .flexbox .normal { flex: 0; margin: 0 0 0 1rem; }
    .flexbox div input { padding: .5em 1em; width: 100%; }
    .flexbox div button { padding: .5em 1em; white-space: nowrap; }



    <!-- HTML ------------------------------------------------------------------->

    <h1>Flexbox Way!</h1>

    <h2>Short Word</h2>
    <section class="flexbox">
            <div class="stretch">
                <input type="text" placeholder="Search..." />
            </div>
            <div class="normal">
                <button>Search</button>
            </div>
    </section>

    <h2>Long Word</h2>
    <section class="flexbox">
            <div class="stretch">
                <input type="text" placeholder="Search..." />
            </div>
            <div class="normal">
                <button>Super Long Word For Search Button With Flexbox!</button>
            </div>
    </section>
        * { box-sizing: border-box; }

        section { width: 100%; display: table; padding: 1em 0 0; }
        div { display: table-cell; width: 100%; }
        input { width: 100%; padding: .5em 1em; }
        button { color: black; padding: .5em 1em; white-space: nowrap; margin: 0 0 0 1em; }

        <h1>Short Word</h1>
        <section>
                <div>
                    <input type="text" placeholder="Search..." />
                </div>
                <div>
                    <button>Search</button>
                </div>
        </section>
Bootstrap - Make Responsive full-width template, non-responsive

Bootstrap - Make Responsive full-width template, non-responsive


By : Teja
Date : March 29 2020, 07:55 AM
will help you The bootstrap documentation has a paragraph to disable responsiveness.
Full width input within dynamic full width container left of fixed width item

Full width input within dynamic full width container left of fixed width item


By : Ed Maste
Date : March 29 2020, 07:55 AM
help you fix your problem Assign display: flex; to your .ric-search-input-group class, and give your a flex-grow: 1;.
CSS
code :
.ric-search-form .ric-search-input-group {
    display: flex;
}

.ric-search-form .ric-search-input-group input {
    flex-grow: 1;
}
body {
  background-color:white;
}
.ric-search-form {
    font-family: "Knowledge Regular";
    overflow: hidden;
    margin-bottom: 23px;
}
.ric-search-form button {
    float: right;
    width: 120px;
    height: 32px;
    background-color: #ff8000;
    color: #fff;
    border-radius: 2px;
    border: none;
    font-size: 14px;
    font-weight: bold;
    margin-left: 15px;
}
.ric-search-form .ric-search-input-group {
    width: auto;
    overflow: hidden;
    border-bottom: 1px solid #c8c8c8;
    margin-right: 15px;
    display: flex;
}
.ric-search-form .ric-search-input-group span {
    font-size: 26px;
    color: #c8c8c8;
}
[class^="icon-"], [class*=" icon-"] {
    font-family: 'icomoon';
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.ric-search-form .ric-search-input-group input {
    outline: none;
    border: none;
    font-size: 28px;
    padding-left: 15px;
    color: #9b9b9b;
    flex-grow: 1;
}
<div class="ric-search-form">
  <button id="ricSearchButton">Search</button>
  <div class="ric-search-input-group"><span class="icon-search8"></span>
    <input style="" placeholder="Search" id="ricSearchField">
  </div>
</div>
Make Bootstrap-Select button go full width (responsive) with btn-block

Make Bootstrap-Select button go full width (responsive) with btn-block


By : Nakul N
Date : March 29 2020, 07:55 AM
I wish this helpful for you You have to attach btn-block to data-style, as shown here. So, your code would be like:
code :
%div.col-md-1
  = fields_for :user do |f|
    = f.select :interest, options_for_select([
      ["one",{"data-value" => "one", 
          "data-content" => "<i class='fa fa-gift'></i> One"}], 
      ["two",{"data-value" => "two", 
          "data-content" => "<i class='fa fa-question-circle-o'></i> Two"}], 
      ["three",{"data-value" => "three", 
          "data-content" => "<i class='fa fa-soccer-ball-o'></i> Three"}]
      ]), {}, :multiple => "multiple", 
              :title => "Choose what you like", 
              :class => "selectpicker"
              :"data-style" => "btn-block"
Inline form make input text full width and responsive

Inline form make input text full width and responsive


By : 3man75
Date : March 29 2020, 07:55 AM
I hope this helps you . According to Docs
code :
/* !important ONLY USED FOR SNIPPET */

.form-inline {
  display: flex
}

.flex {
  flex: 1;
  display: flex !important
}

.flex input {
  flex: 1 !important
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="panel panel-primary">
  <div class="panel-heading">
    <h4>Search Options</h4>
  </div>
  <div class="panel-body">
    <form class="form-inline">
      <div class="form-group">
        <div class="btn-group">
          <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                Account ID &nbsp; <span class="caret"></span>
              </button>
          <ul class="dropdown-menu">
            <li><a href="#">Account ID</a></li>
            <li><a href="#">Company Name</a></li>
            <li><a href="#">Account Type</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="#">Marketplaces</a></li>
          </ul>
        </div>
      </div>
      <div class="form-group flex">
        <input class="form-control" type="text" value="" id="filter_id" placeholder="Put your filter here">
        <button type="button" class="btn btn-default"> Filtrer </button>
      </div>
    </form>
  </div>
</div>
Related Posts Related Posts :
  • Angular 2 Checkbox Two Way Data Binding
  • Image to Fit Containing Div
  • Fixed width for table first column
  • How can I alter the formatting of pandoc footnote marks?
  • push is not a function Angularjs error
  • Angular2 Call method in Template
  • Stop playing video in iframe when modal is closed
  • Bootstrap. Can't change navbar link color. Even with ID
  • Making a position:absolute div stay in place on page resize
  • Can we reference contents of <defs> across multiple <svg> elements?
  • Kendo Chart Databinding - Local Json Data with schema
  • Box shadow appearing from right to left
  • BEM element nest naming and sass rule
  • How to vertically center text next to image?
  • Make three headings in line. One to be on the left, second on center and third on the right?
  • XPath for all child elements before a certain sibling?
  • How to prevent default Css scroll onclick and allow javascript event only?
  • CSS Media Query not accounting for screen density?
  • How to stop second navbar from overlapping fixed navbar at the top of the page
  • List Indentation same x-cord as header
  • Sending file input doesn't work
  • Scale div padding according to screen width
  • Flexbox doesn't work in summary tag
  • CSS - mobile responsive issue with absolute positioning
  • Align image slider at the same bottom using css (Slick Carousel library)
  • Input border CSS
  • Define a custom <a> tag in CSS?
  • How to write vertical text from bottom to top without using transform rotate?
  • Text sometimes warping, sometimes not
  • CSS Correctly positioning pseudo element
  • Center Cropping Image
  • How to wrap a block around a div tag?
  • How to make a tight cell around text and expand empty ones?
  • make exact padding on text
  • position:relative started working different than at first (asp.net)
  • Html does not display in 1/2 columns
  • Positioning shapes to website
  • overwrite another tag in CSS
  • How to calculate sum on change?
  • Why do the browsers automatically wrap text of a web page without any indication about how to do it?
  • Sizing and positioning a border property
  • How do I float div's to the bottom of a page?
  • Responsive html with absolute position text inside relative positon picture
  • Flexbox doesn't work in IE 10
  • AngularJS shopping cart app: Disable button when quantity < 2
  • How to select element by order ? - Css
  • How to apply animation on the list items such that during an instance of time only one list item is visible?
  • responsive CSS - display:inline UL breaking into 2 lines, seems to have enough space
  • Reduce space between responsive div or classes html/css3
  • CSS image disappears too fast
  • Spring boot not redirecting to desired page
  • dont know how to make a proper mixin for background
  • Logout form within Bootstrap navbar dropdown
  • how to stack images from bottom up in Django
  • Auto scroll image taller than container on hover (taller image)
  • Is SASS/SCSS a way to make OOCSS?
  • Is there a work around to turning flex items to containers?
  • CSS HTML | Search input has round corners in safari
  • How do I align all my div's in one line?
  • Mvc DropdownList Not working
  • shadow
    Privacy Policy - Terms - Contact Us © soohba.com