logo
down
shadow

Align input element with his label


Align input element with his label

Content Index :

Align input element with his label
Tag : html , By : Ari
Date : November 25 2020, 12:01 PM

it fixes the issue I would like to align the border of an input with the bottom of his label.
#options_body_search {
    width: 100%;
    height: 3vh;
    margin: 1vh 0 0.8vh 0;
}

#options_body_search .container {
    display: flex;
    flex-direction: row;
    width: 70%;
    height: 100%;
    margin: 0 auto;
    align-items: flex-end;
}

#options_body_search label {
    display: block;
    width: 22.5%;
    height: 55%;
    padding: 0.5vh;
    font-size: 0.7vw;
    font-weight: bolder;
    background: #1C57A5;
    color: #FDFFFC;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

#options_body_search input {
    display: block;
    font-size: 0.7vw;
    border: none;
    border-bottom: 2px #1C57A5 solid;
}

#options_body_search input::placeholder {
    font-size: 0.7vw;
}
<div id="options_body_search">
    <div class="container">
        <label for="global_search">Recherche:</label>
        <input id="global_search" type="text" placeholder="Rechercher dans toutes les colonnes" size="35">
    </div>
</div>

Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Vertically align input next to word-wrapped label with support for non-wordwrapped label?


Tag : css , By : user179938
Date : March 29 2020, 07:55 AM
Any of those help http://jsfiddle.net/9ctTD/18/
label {
  max-width: 80px;
  vertical-align:middle;
}

Align 6 elements at 1 line (Label+Input, Label+Input, Label+Input)


Tag : html , By : 40a
Date : March 29 2020, 07:55 AM
hop of those help? I wanted to create a view that will capture user's input. I have many fields to be included. Basically I separate them into 3 fields at the same time horizontally. Here's the sample image. , If this is your raw HTML:
<form action="">
  <p>First Name</p>
  <input type="text" name="fname" />
  <p>Middle Name</p>
  <input type="text" name="mname" />
  <p>Last Name</p>
  <input type="text" name="lname" />
  <p>Age</p>
  <input type="text" name="age" />
  <p>Gender</p>
  <select name="gender">
    <option value="male">Male</option>
    <option value="female">Female</option>
  </select>
  <p>Phone Number</p>
  <input type="text" name="fname" />
</form>

Bootstrap, align input with label to button without label, vertical form / not horizontal


Tag : twitter-bootstrap , By : user90210
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , Bootstrap is a great structure in which you can create any kind of html just you need to understand the structure. Always try to use only bootstrap classes but not the external things.
Check this bootstrap only structure with the desired output
<div class='container' style='width:200px; margin: 50px;'>
  <div class="row">
    <div class="col-lg-12">
      <label>Name</label>
      <div class="row">
        <div class="col-xs-10">
          <div class="form-group">
            <input type="text" class="form-control" />
          </div>
        </div>
        <div class="col-xs-2">
          <div class="form-group">
            <div class="btn btn-danger">Remove</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Align element with input (and not with label) - Bootstrap 3


Tag : html , By : user121350
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , I would do this in the current situation. Hope this helps you. As the hyperlink is part of the form input so I will keep it together instead of putting it inside another form-group.
.form__side__hyperlink {
  position: absolute;
  left: 100%;
  bottom: 10px;
  /* or bottom 0 if you want it on the bottom */
  white-space: nowrap;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="row">

  <div class="form-group col-xs-4">
    <label class="form__label" for="form__field__recipientId">Código  beneficiario </label>
    <input class="form-control input-md col-xs-8" id="form__field__recipientId" name="form__field__recipientId" type="text" placeholder="Introduce ordenante">
    <a class="form__side__hyperlink p-t-20" href="">Buscar beneficiario</a>

  </div>

</div>

Using a label element to display an input with inner label - Input width exceeds label in Firefox


Tag : html , By : Erik
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Doesn't setting min-width:0 to the input and making it use all available width via flex:1 solve the problem?
.container { width: 400px; }
.w70 { width: 70px; }

.input-with-label {
   border: 1px solid #D9D9D9;
   display: flex;
   align-items: center;
   background-color: #fff;
}

.input-with-label.-dollar-amount > input[type='text'] {
   text-align: right;
   font-weight: 600;
   
}

.input-with-label > input[type='text'] {
   margin: 0;
   border: none;
   min-width: 0;
   flex: 1;
}

.input-with-label > .input-label {
   padding-left: 3px;
   font-size: 10px;
   border: none;
}
<div class="container">
  <label class="input-with-label -dollar-amount w70">
    <span class="input-label">$</span>
    <input type="text" value="0.00" />
  </label>
</div>
Related Posts Related QUESTIONS :
  • Is there any way to edit specific Column of table using mat-table in Angular material
  • How can I set a text as a shadow for a heading element?
  • How to fix the forms making the buttons overlap
  • Splitting XML into multiple HTML pages with XSLT?
  • How to justify empty divs in flex container
  • How to blur in CSS only one layer of when you have multiple layers in background-image?
  • Scrollable html table with fixed first row and first column, along with angular material controls within the cells of ta
  • In Django, how to extract ID attribute from html Input tag, WITHOUT using django forms
  • how to fix link tag in html after changing css
  • How do I add a top padding to the second row?
  • Is it possible to split XML into multiple HTML pages with page navigation?
  • AngularJS: responsive height in bootstrap
  • Hide second line of text with CSS
  • repeating-linear-gradient not working in Edge browser and internet Explorer Browser
  • how to make search and form category merges like amazon on bootstrap
  • Bootstrap: Rearranging rows into columns and changing the order of elements
  • How can I move a label under a text box?
  • How save LinearGradient To database
  • How to reposition an image with a linear gradient using css?
  • HTML audio will not play when page opened by batch file
  • CSS Three Tone Diagonal Background
  • How to use slots inside of template components in HTML
  • Using span tags in meta description & title, for dual languages
  • How to make an icon/span selectable by pressing Tab key?
  • Add dynamic margins using UI Kit
  • Add margin-top to textbox
  • What is the correct semantic HTML markup for a title (book, movie, etc.), according to the spec? Is it an <em> tag
  • How to make an animation in Geoserver or in Leaflet
  • Buttons overlapping when shrinking window
  • Stretch an element to the end of the automatically calculated grid, not just the explicit grid
  • What relation is there between Angular's <ng-content> and ShadowDOM
  • CSS background for div element is not working
  • CSS Marquee: multiple paragraphs overlaps
  • I want to align search bar to extreme right
  • Getting blank white space to the left of content inside pre tags
  • My viewer.html won't load any css and jss files
  • How to apply multiple styles to HTML to only part of a title?
  • Want to make text div transparent on a parallax area
  • Is there a way to make this ID plus descendants CSS rule less specific?
  • Is there a way to drop in a stylesheet to get a Material theme or similar for all form elements on the page?
  • How do I make a sideways L look in html/css?
  • Why won't the color #e67d22e1 display in Safari?
  • How to select specific tag's attribute value with xPath?
  • How to make div rows fill available height
  • How to fix text inside a block that grows
  • svg hexagon halftone pattern
  • How to edit a website's element's background colors using a chromium extention
  • What is the main tag in HTML5 ? How does it differ from body tag?
  • My image is flowing out from my div column. How I can fix it and made the image full-size into div
  • How to draw line in react
  • Why Transition css is not working in child selector css
  • How to modify materialize css select option?
  • How to center some text in a rectangle in CSS?
  • How do I equally space out css grid columns?
  • How to make sure all the parts of a macro are running correctly?
  • How to adjust the zoom of website at different browser at different screen size?
  • Can't set max height on child div properly
  • Why background color is not applying to DIV container?
  • Need to select the first-child
  • No space between attributes in buttons
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com