Adjust all elements to align to the left in Bootstrap 3

I prefer aligning all components to the left and also like having control over their sizing. For instance, take a look at this: div class="containerSelectBox checkbox_label"

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Title</title>
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />


  <style>
    .demo-content {
      font-size: 18px;
      min-height: 300px;
      background: #dbdfe5;
    }
    
    .demo-content.bg-alt {
      background: #abb1b8;
    }
    
    .green {
      background: yellow;
      border: 1px solid lightgreen;
      text-align: center;
    }
    
    .containerSelectBox {
      overflow-y: scroll;
      height: 80px;
      padding: 6px 12px;
      font-size: 14px;
      line-height: 1.42857143;
      color: #555;
      background-color: #fff;
      border: 1px solid #ccc;
      border-radius: 4px;
      -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
      box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
      -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
      -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
      transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    }
    
    .checkbox_label label {
      margin: 0px 20px 0px 3px;
      cursor: pointer;
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="row">
      <div class="col-lg-12 green ">
        <span class="text-left">
                <h3>
                    APP Configuration
                </h3>
            </span>
        <div class="row">
          <div class="col-lg-12 pull-left">
            <div class="col-xs-1 col-sm-1 text-left">Email</div>
            <div class="containerSelectBox checkbox_label col-xs-5 col-sm-5 pull-left" id="multi_select">
            </div>
            <div class="col-xs-1 col-sm-1 text-left">Email:</div>
            <div class="containerSelectBox checkbox_label col-xs-5 col-sm-5 pull-left" id="multi_select2">
            </div>
          </div>
          <div class="col-lg-12 pull-left">
            <div class="col-xs-1 col-sm-1 text-left">Email:</div>
            <div class="containerSelectBox checkbox_label col-xs-5 col-sm-5 pull-left" id="multi_select3">
            </div>
            <div class="col-xs-1 col-sm-1 text-left">Email:</div>
            <div class="containerSelectBox checkbox_label col-xs-5 col-sm-5 pull-left" id="multi_select4">
            </div>
          </div>
          <div class="col-lg-12 pull-left">
            <div class="col-xs-1 col-sm-1 text-left">IP:</div>
            <div class="col-xs-5 col-sm-5 pull-left">
              <input type="text" required="required" id="foo3" class="form-control col-xs-5 col-sm-5" disabled>
            </div>
            <div class="col-xs-1 col-sm-1 text-left">IP:</div>
            <div class=" col-xs-5 col-sm-5 pull-left">
              <input type="text" required="required" id="foo2" class="form-control col-xs-5 col-sm-5" disabled>
            </div>
          </div>

        </div>
      </div>
    </div>
  </div>


</body>

</html>

This completely disregards the tall CSS: In the code snippet, it appears odd, with the main target being desktops. Currently, it looks like this: https://i.sstatic.net/MxxrS.png I am attempting to align everything to the left and maintain the CSS high height of 80px; you can see that there is a gap between the textbox and the text.

Answer №1

Include the following code snippet within your <header> section, it might resolve the issue

<header>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</header>

Additionally, consider upgrading to the newest version of Bootstrap.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Adding spacing between <li> elements

My horizontal menu is made up of <li> elements styled with display: inline. These elements are designed to sit beside each other seamlessly. For ease of debugging, I prefer to have each li element on its own line in the source code: <li class=" ...

Trigger an alert message upon loading the HTML page with search text

I need to search for specific text on a webpage and receive an alert if the text is found. <script type='text/javascript'> window.onload = function() { if ((document.documentElement.textContent || document.documentElement.innerText ...

Error in Angular4 Typescript: The 'data' property is not found on the 'any[]' type

During my development of an Angular 4 app using TypeScript, I encountered an error that states: Property 'data' does not exist on type 'any[]' This error occurs when trying to access the 'data' property in the following co ...

Combining formData props with Component state in React using Redux

Monitoring form input changes and saving them to the state in my Editor Component. Upon form submission, dispatching the formData from the state to the store. Upon Component reloads, intending to merge the prop's formData with the state. Attempted u ...

Unexpected behavior encountered with the 'touchmove' event in React

Currently, I am developing an application using NextJS that involves creating a window manager where users can drag and resize panels. While everything functions correctly on desktop devices, the event listeners are not behaving as expected on mobile devic ...

The file refuses to download after an AJAX post

When accessing the URL directly from my program that generates a PDF, I am able to initiate a direct download. public void Download(byte[] file) { try { MemoryStream mstream = new MemoryStream(file); long dataLengthToRead = mstre ...

Enhancing jQuery UI popups with custom styles and layout

Currently, I am working on a web application that relies heavily on jQuery. To create popup windows, I have integrated jQuery UI dialog along with jQuery UI tabs and jScrollPane for customized scroll bars. The overall structure of the application is as fol ...

How can you apply the ngStyle directive to set the CSS property for the Angular Material Data Table header aligning it to

For this demonstration, I am attempting to dynamically set the left CSS property of the CUSTOMER mat-header-cell to 64px using ngStyle. However, it seems that Angular is overriding the value with its own interpretation, changing it to 216px after applying ...

Issue with child rows not functioning properly in DataTables when utilizing Datetime-moment

I've successfully integrated this data into live.datatables.net and almost have it running smoothly. However, I am encountering an issue with displaying the last detail as a child element. The final part of the row should be shown with the label "Mes ...

What is causing my mobile navbar to not collapse when the page loads?

I'm having trouble collapsing the navbar on mobile devices. Currently, the navbar only collapses when I manually resize the tab. It seems like the issue is related to it not checking the screen size when the site initially loads. I've attempted t ...

Fire the click event following the parsing of the HTML page

Is it possible to programmatically navigate to a URL, retrieve the response, and then activate the JavaScript click event of an HTML element within that response? For example, if the response contains an element like this: <div id="test">Click me< ...

The clash between a static property name type and a dynamic property name on an interface is causing

My interface, Item, is quite straightforward and is applied to various objects. This interface mandates that each of these objects must have an assigned itemName property, but they can also include additional properties with dynamic names if necessary. T ...

Angular - Switching Displayed Information

I am currently working with Angular 4 and I am attempting to switch between contenteditable="true" and contenteditable="false" Here is what I have so far: <h1 (dblclick)="edit($event)" contentEditable="true">Double-click Here to edit</h1> Al ...

Is there a way to prevent a 'keyup' event from being triggered by a 'keydown' event?

I have a tool that resolves zip codes and I am currently utilizing a keyup event handler to trigger a server query once the input length reaches 5 characters. However, I want to prevent unnecessary calls to the script, so I am exploring the possibility o ...

Exploring the mechanics of callbacks in jQuery's Ajax functionality

Greetings fellow developers! I've embarked on a new programming project with the firm intention of writing cleaner and more easily maintainable code than ever before. However, I have encountered my old nemesis - jQuery AJAX returns. The last time I t ...

Is it possible for a beginner like me in Node.js to incorporate external npm packages into Express.js and React.js?

Recently, I embarked on a journey to learn Node.js for backend development. In the past month or so, I have familiarized myself with various concepts such as npm, Express.js, Mongoose, and MongoDB for database management. During my npm exploration, I dis ...

Develop a text input field using jQuery that automatically populates with a value calculated from an array's length and its contents upon page load

My goal is to generate dynamic text input fields based on an array received from a JSON. The number of input elements should match the length of the array, with each input field assigned a value from the array. These input elements are created when the pag ...

Binding Angular's ng-model to the element's name property

Is there a way to dynamically bind ng-model to a scope property with the same name as the element? For example, in this code snippet: <input name="myinputname" type="text" ng-model="?" /> Is there a method to set the ng-model value to resolve to " ...

Unusual Floating Glitch

I'm working on a Modal Box that contains responsive images. Code: http://jsfiddle.net/YCcNY/34/ When hovering over the images, they enlarge. However, there seems to be an issue with the last image in the first row, as it sometimes breaks the layout ...

Using the JQuery template with $.get function does not produce the desired result

Working on populating a table using a Jquery Template can be tricky. One challenge is incorporating a json file via an ajax call for the population process. $(document).ready(function() { var clientData; $.get("/webpro/webcad/lngetusuario", funct ...