Creating side by side input panels with Bootstrap version 3.1 on Internet Explorer 8

Although I have some familiarity with Bootstrap, my experience with it is limited. While attempting to create a static form using Bootstrap, I encountered difficulties getting panels to align side by side using the "col-md-6" class within rows.

Despite my efforts to consult Bootstrap documentation and examples, I have been unsuccessful so far. I've spent time modifying classes, altering divs, adding divs, and making various adjustments without success.

Below, I have included the problematic code extracted from my form:

<div class="container">
<div class="form-group col-md-6">

    <div class="panel panel-default">
        <div class="row col-xs-3">
                <label for="strategy" class="control-label">Strategy</label>                            
                <input type="text" class="form-control" id="strategy" placeholder="Strategy" />
        </div>

        <br/>
        <br/>
        <br/>
        <br/>

        <div class="row col-md-6">
            <label>Type of Service:</label>
            <ul>
                <li class="checkbox">
                    <input type="checkbox" value="" />
                    Transport
                </li>
                <li class="checkbox">
                    <input type="checkbox" value="" />
                    Storage
                </li>
                <li class="checkbox">
                    <input type="checkbox" value="" />
                    Balancing
                </li>
                <li class="checkbox">
                    <input type="checkbox" value="" />
                    Park/Lend
                </li>
            </ul>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="row col-xs-3">
            <label for="internalBusinessUnit" class="control-label">Internal Business Unit</label>
            <input type="text" class="form-control" id="internalBusinessUnit" placeholder="Internal Business Unit" />
        </div>

        <br/>
        <br/>
        <br/>

        <div class="row col-md-6">
            <ul>
                <li class="checkbox">
                    <input type="checkbox" value="" />
                    Hub/Wheel
                </li>
                <li class="checkbox">
                    <input type="checkbox" value="" />
                    Exchange
                </li>
                <li class="checkbox">
                    <input type="checkbox" value="" />
                    Pooling
                </li>
                <li class="checkbox">
                    Other: 
                    <input type="checkbox" value="" />
                    <div class="col-xs-2">
                        <input type="text" class="form-control" id="other" placeholder="" />
                    </div>
                </li>
            </ul>
        </div>
    </div>
</div>

I have attempted using form tags, form-inline, and form-horizontal, but my main goal is to align each panel side by side. Additionally, I am experiencing issues with the "Other" label appearing after the input box.

For reference, here is a Fiddle: Fiddle

*I acknowledge that there may be a better approach to positioning elements on the next line instead of using break lines, but as a beginner in Bootstrap, I am learning through trial and error. I assumed that using the "row" class would stack the elements vertically.

Answer №1

I made a few adjustments to it. I believe you will find this version easier to work with.

Check out the updated JSFiddle here

Just a heads up: I utilized

form-group

and organized the columns to improve the form layout.

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

Where to position a button in the middle of a div that varies in size

I'm currently working with this code snippet: <div class="outer"> <ul class="list"> <li class="inner"> <div class="line">information1</div> <div class="line">hyperlink1</div&g ...

Using jQuery, you can easily modify the color of a TD cell by applying the css properties assigned to the div element

I am attempting to implement a jQuery script that will execute upon the loading of the document. The objective is for the script to retrieve the background color of a div located within a td cell and apply it as the background color for the respective td c ...

adjust the width of an element based on the size of characters within it

I need to ensure that the width of a div is equivalent to 10 characters If one character is equal to 2px, then I want the width to be 20px, even if the text is only 4 characters long. <div class="row"> <div class="key">City</div> ...

In the HTML body, create some breathing room on the side

While working on a virtual restaurant menu with bootstrap, I encountered an issue where there was a persistent little space at the right side of my page that remained unfilled. Despite trying various solutions and inspecting elements, I couldn't ident ...

The scroll bar disappears behind the div

Hello, I am looking to create an HTML layout similar to the one shown below: +----------------------+-----+ | upSide | | |----------------------| | | |right| | |side | | ...

Error in browser caused by JQuery JavaScript, not Dreamweaver

I need help creating a webpage that can extract and display recent earthquake data based on user input location on Google Maps. I have been using Dreamweaver to test my code, and everything functions perfectly when I use the live webpage feature within th ...

Can a website trigger an alarm on a user's iPhone without their permission?

Even though I have limited experience with HTML, CSS, and Javascript, I am curious if it is possible to create a basic website that can trigger an alarm on the user's device by simply clicking a button. For example, imagine a scenario where a user is ...

Centering a Font Awesome icon within its parent element

Below is the code I am using: <div style="width:60px; height:60px; background-color: lightgrey;"> <a class="" href="javascript:void(0)" style="color: black; width: inherit; height: inherit;"> <i class="fa fa-lg fa-play" aria-hidden="t ...

Create unique list markers by utilizing the "::marker" and "content" properties

When attempting to create a list with custom list markers, I encountered an issue. An example from MDN is provided: li::marker { content: '✝ '; font-size: 1.2em; } <p>Group known as Mercury Seven:</p> <ul> <li& ...

Tips for implementing resizable Material-UI Dialogs

I'm working on a project that involves creating a dialog box that can be resized and dragged. While I found steps in the Material-UI Dialog documentation on how to make it draggable, I'm still looking for information on how to make it resizable. ...

What causes the list to shift instead of the image when the vertical-align property of the image is unchecked?

How come when the vertical-align property on this image is unchecked, it affects the list rather than the image itself? Checked: https://i.sstatic.net/NQhf0.jpg Unchecked: https://i.sstatic.net/jS7er.png ...

What is the best way to maintain two distinct background effects that each require different pixel sizes?

I am attempting to create a gradient that goes from the top-right corner to the bottom-left corner, and I also want to add a grid of dots. However, the method I am using to create the grid of dots is through a radial gradient which requires a small backgro ...

Conceal navigation options on smaller screens and enable drop-down menu functionality with Bootstrap 3

With the usage of Bootstrap 3, I have successfully hidden two menu items when the screen is resized. However, these items still appear in the drop down menu that appears on the top left (with three bars) when the screen size is reduced. Is there a way to k ...

Wide container using Bootstrap

Currently, I am incorporating Bootstrap v5 alpha to develop a basic dashboard. According to Bootstrap guidelines, it is essential to utilize .container, .container-fluid, or .container-{size}, followed by .row and .col columns. However, I wish for the das ...

Best practice for incorporating Bootstrap into Webpack

Greetings everyone, I've been experimenting with Bootstrap for Webpack, but I've hit a roadblock. After reading numerous blog articles, I found that they either rely on the outdated 'bootstrap-webpack' plugin from 7 months ago (which d ...

Using CSS3 to shift a div in relation to another moving div

Take a look at this JSfiddle. I am trying to make the "Push this!" div move when the menu resizes/expands on hover. Is it possible to achieve this effect using only CSS? <div id="nav"> <ul> <li><a href=""><span>01</spa ...

Bootstrap 5's h-100 feature functions flawlessly in Chrome, however, it encounters issues when used with a group

Can you please refer to this question: Issue with Aspect Ratio of Images in Bootstrap 5 due to Padding After applying the h-100 solution, everything looks great on Chrome. Unfortunately, when I check it in Safari, the aspect ratio of the image gets distor ...

Duplicate a form based on the selected option

My goal is to duplicate a form based on the numerical value selected from the drop-down menu. You can find the corresponding code in this JSFiddle. Here is the HTML code: <div class="travel_tour-info"> <h3>How many people are you booking for? ...

Simple Method To Dynamically Align jQuery LightGallery Thumbnails On a Responsive CSS Website

Can anyone assist me quickly? I've implemented everything but am facing a slight issue with the centering of my ul code. I've tried various solutions without success. Here is my code, any advice would be greatly appreciated (I may sound stressed ...

Angular 6: encountering difficulty in setting up component routes (from root to child) when creating separate modules

As a newcomer to Angular, I'm encountering some difficulties in defining child routes in Angular. I'm not sure where I'm going wrong. When I try to create a separate module for the child components, I run into issues when defining the routes ...