The alignment of Bootstrap columns within a row is not consistent

Within my bootstrap code, I have organized all columns to be stacked on screens of various sizes except for large screens. On larger screens, my goal is to arrange the columns side by side in a single row. Although I believe I have correctly implemented the col-lg-x tags to resize the columns accordingly, they still remain vertically stacked. In order to achieve my desired layout, I need them to align horizontally on large screens.

<body class="container-fluid">
   <div class='row'>
        <div class='col-lg-2 sec' style="align-items: flex-start;">
            <form>
                <select class="cat">
                    <option> EV </option>
                    <option> Tech </option>
                    <option> Pharma </option>
                    <option> Cannabis </option>
                    <option> Solar </option>
                    <option> Auto </option>
                    <option> Socials</option>
                    <option> Crypto </option>
                </select>
                <select class='amount'>
                    <option> 5 </option>
                    <option> 10 </option>
                    <option> 20 </option>
                    <option> 25 </option>
                </select>
                <input type="submit" class="Apply"></div>
            </form>
        </div>
        <div class='col-lg-6 sec'>
            <div class='col' style=" font-weight: bold; color:#D8E1EB">
                Symbol
                <div class='col syms'>
                </div>
            </div>
            <div class='col' style=" font-weight: bold; color: greenyellow">
                High
                <div class='col highs'>
                </div>
            </div>
            <div class='col' style=" font-weight: bold; color: red">
                Low
                <div class='col lows'>
                </div>
            </div>
            <div class='col' style=" font-weight: bold; color:#D8E1EB">
                Open
                <div class='col opens'>
                </div>
            </div>
            <div class='col' style=" font-weight: bold; color:#DE772C">
                % Change
                <div class='col percs'>
                </div>
            </div>
        </div>
        <div class='col-lg-4 sec'>
            <div class='col' style=" font-weight: bold; color: greenyellow">
                High
            </div>
            <div class='col' style=" font-weight: bold; color: red">
                Low
            </div>
            <div class='col' style=" font-weight: bold; color:#D8E1EB">
                close
            </div>
            <div class='col' style=" font-weight: bold; color:#DE772C">
                % Change
            </div>
        </div>
    </div>
</body>

Answer №1

I made some adjustments to your code. Please check the Full page status

    <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
  <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
   <div class='row'>
        <div class='col-lg-2 sec' style="align-items: flex-start;">
            <form>
                <select class="cat">
                    <option> EV </option>
                    <option> Tech </option>
                    <option> Pharma </option>
                    <option> Cannabis </option>
                    <option> Solar </option>
                    <option> Auto </option>
                    <option> Socials</option>
                    <option> Crypto </option>
                </select>
                <select class='amount'>
                    <option> 5 </option>
                    <option> 10 </option>
                    <option> 20 </option>
                    <option> 25 </option>
                </select>
                <input type="submit" class="Apply"></div>
            </form>
        </div>
        <div class='sec row'>
            <div class='col col-sm-2 col-md-2 col-lg-2 col-xl-2' style=" font-weight: bold; color:#D8E1EB">
                Symbol
                <div class='col syms'>
                </div>
            </div>
            <div class='col col-sm-2 col-md-2 col-lg-2 col-xl-2' style=" font-weight: bold; color: greenyellow">
                High
                <div class='col highs'>
                </div>
            </div>
            <div class='col col-sm-2 col-md-2 col-lg-2 col-xl-2' style=" font-weight: bold; color: red">
                Low
                <div class='col lows'>
                </div>
            </div>
            <div class='col col-sm-2 col-md-2 col-lg-2 col-xl-2' style=" font-weight: bold; color:#D8E1EB">
                Open
                <div class='col opens'>
                </div>
            </div>
            <div class='col col-sm-2 col-md-2 col-lg-2 col-xl-2' style=" font-weight: bold; color:#DE772C">
                % Change
                <div class='col percs'>
                </div>
            </div>
        </div>
        <div class='sec row'>
            <div class='col col-sm-2 col-md-2 col-lg-2 col-xl-2' style=" font-weight: bold; color:#D8E1EB">
                Symbol
                <div class='col syms'>
                </div>
            </div>
            <div class='col col-sm-2 col-md-2 col-lg-2 col-xl-2' style=" font-weight: bold; color: greenyellow">
                High
            </div>
            <div class='col col-sm-2 col-md-2 col-lg-2 col-xl-2' style=" font-weight: bold; color: red">
                Low
            </div>
            <div class='col col-sm-2 col-md-2 col-lg-2 col-xl-2' style=" font-weight: bold; color:#D8E1EB">
                close
            </div>
            <div class='col col-sm-2 col-md-2 col-lg-2 col-xl-2' style=" font-weight: bold; color:#DE772C">
                % Change
            </div>
        </div>
    </div>
</body>

   
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
  

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

Enhancing the Appearance of HTML Select Dropdowns in JavaFX 2.2 WebEngine

I am currently working on a project that is unable to be updated to Java 1.8 to support the latest JavaFX version. While this may or may not impact the issue I am facing, I have been exploring various solutions from the internet to customize the look and f ...

Utilizing KnockoutJS to Apply CSS Binding Based on Dropdown Selection

Check out the live example here: http://jsfiddle.net/0gmbbv5w/ In my application, I have an object retrieved from the database that I bind to a <select> var NoticeType = function (noticeType) { this.NoticeTypeId = ko.observable(noticeType.Notic ...

Issues with padding in the h1 title of a mobile website

I am currently working on creating a mobile-friendly version of a website. However, I am facing an issue where the background image set for an H1 title is only taking into account the "text height" and not the actual picture height specified in the CSS. A ...

What is the best way to show HTML code on a REACT website without disrupting the existing styles?

I am trying to showcase the following code in a REACT webpage, but it is not displaying as code. Instead, it is showing as actual elements. How can I display the button codes below as actual code? <code> <pre> <Button className='btn-grv ...

Positioning an immovable element beneath a fixed element that can vary in height

I am working on a webpage that features a fixed menu at the top-left corner, followed by the main content. My goal is to ensure that the content appears below the menu, but since I do not know the exact height of the menu in advance (as it can vary based o ...

HTML tag naming can vary in different array types

When working on a project, I came across the need to clone input elements. After searching online, I found various ways to achieve this. One method involved creating an HTML input array with different naming conventions depending on the source. For example ...

Best Practices and Tips for Layout Design Using HTML and CSS Grid

As I begin my journey into front-end development, I am currently immersing myself in studying html, css, and vanilla javascript. While things are going well so far, I find myself struggling with understanding the organization of design layouts in general. ...

Is it possible to target a specific element within one of two classes that share the same name using CSS or XPath in Webdriver.IO?

Currently, I am using Webdriver.io and facing a challenge in selecting an element within the "text-fields-container" class. This particular element happens to be a password field, and both classes share the same name. Can someone guide me on how to go abou ...

Text with background coloring only

My text background always extends beyond the screen. Can anyone help me figure out what I'm doing wrong? Here is the HTML code: <div class="textSlide"> <span id="firstTitle">We assist you in finding all the individu ...

Struggling to retrieve variable values for dynamically generating a form using JavaScript

The form will be created in this HTML file within a "div" with the ID of "form". The variables are defined within the HTML file. <body> <script> var types=['text','number', 'text']; var fields ...

I am experiencing issues with my images not appearing on my Laravel website despite trying various solutions found online. The images upload successfully but fail to display on the site

I'm facing an issue where the image uploads correctly but does not display. Is there something missing in my code? <div class="col-md-4"> <img class="img img-fluid img-thumbnail" src="/storage/profile_images/{{$prof ...

Is it necessary to upload static files in included HTML when using Django?

I am currently in DEBUG mode and I need to convert an HTML page into a PDF using PrinceXML. Within my main HTML file, the code looks like this: {% extends "base.html" %} {% load staticfiles %} {% load url from future %} {% block title %}Title{% endblock ...

Is there a method for displaying a gif with an alpha channel for transparency effects?

Is it possible to make the black color in a realistic gif animation transparent using CSS? The snow is white and everything else is black, but I want to overlay it on my header image with the snow falling realistically. I've seen animations of falling ...

Styling the footer to sit at the bottom of the page with a wider width, overlapping the content

I've encountered an issue where the footer of my webpage overlaps the content when the main content is long and users cannot scroll properly. Additionally, I've noticed that the width of the footer is larger than the header of the website. Below ...

Fixing My Code with JQuery Tabs and Hyperlinking

I have come across a problem while using multiple pages with jQuery tabs. Let's consider Page1.html with #tab1 and #tab2, and Page2.html with #tab3 and #tab4. Here are the issues I am facing: 1) Within the tab content of Page1.html#tab2, there is a h ...

Using both PHP $_POST and $_GET in a form submission for enhanced functionality

My preferred programming language is PHP. I am currently working on a form and once it is submitted, I want it to redirect to a specific URL with a $_POST variable attached at the end (formatted as a $_GET), for example: http://example.com/page.php?my_ke ...

PhoneGap: Upgrade HTML files for offline functionality

I am seeking to develop an app that offers basic information in a table format. Currently using PhoneGap, I have the necessary data and can input it into the HTML file. However, if there are any updates or changes to be made, do I need to hold off on pub ...

What is the lowest opacity value allowed in CSS?

When adjusting the opacity value of a button in CSS, I have noticed that even when the opacity is reduced to 0.005, the button remains clickable to some extent. However, when reducing the value to 0.000000000000000000000000000000000001, the button becomes ...

Implementing a queue with an on-click event

As a self-proclaimed Java nerd diving into the world of jQuery, I'm facing some challenges. My goal is to create 3 interactive boxes that behave in a specific way: when clicked, one box should come forward while the other two dim and stay in the back ...

Div is overlapped by footer | ASP .NET

On the main page, the footer appears right under the automatically generated menu bar at the top, causing interference with the main div. This issue seems to be isolated to the main page and does not occur on other pages, indicating a problem specific to t ...