Techniques for adding multiple elements in a grid system while ensuring responsiveness

Looking for guidance on designing a responsive screen using the Bootstrap-4 grid system for web development. Here's an image of what I'm aiming to create using rows and columns:

View the grid picture here

Code snippet:

<div className="row">
<div className="col-md-10">
    <div className="row">
        <div className="col-md-4">    
            <div className="fontStyle">
                <span className="">1</span>
                <label type="text">Select Technology</label>

                    <select value=""  className="selectpicker btn btn-labeled btn-start">
                        <option value="">None Selected</option>
                        <option value="">Hello </option>
                        <option value="">World </option>
                    </select>
            </div>
        </div>
        <div className="col-md-4 rowOne">
            <div className="fontStyle">
                Select Question Type                    
                <button type="button" class="btn btn-primary btn-sm">Code Type</button>
                <button type="button" class="btn btn-default btn-sm">Non Code Type</button>
            </div>
        </div>
        <div className="col-md-4">
            <div className="fontStyle">
                Number Of Questions
                <select value="" onChange="" className="selectpicker btn btn-labeled btn-start">
                    <option value="">Select</option>
                    <option value="">01</option>
                    <option value="">02</option>
                </select>
            </div>
        </div>
    </div>
</div>
<div className="col-md-2">
    <span className="">
        <button type="button" class="btn btn-outline-primary btn-sm">Reset</button>
    </span>
    <span>
        <button type="button" class="btn btn-primary btn-sm">+</button>
    </span>
</div>

Check out the final design here

Any help or advice is appreciated, thank you!

Answer №1

Check out this helpful resource: link

The grid system is based on a maximum of 12 columns, so remember to divide your columns accordingly.

To ensure your elements are on the same line, don't forget to add =>

class="row"

before implementing your grid system. Practicing with different column values will help you understand the grid system better.

UPDATE :

Take a look at this example-->

<div class="container">
<div class="row">
    <div class="col-md-4">
        <span class="">1</span>
        <label type="text">Select Technology</label>
        <select value="" class="selectpicker btn btn-labeled btn-start">
            <option value="">None Selected</option>
            <option value="">Hello </option>
            <option value="">World </option>
        </select>
    </div>

    <div class="col-md-4">
        <div class="row">
            Select Question Type                    
            <button type="button" class="btn btn-primary btn-sm">Code Type</button><button type="button" class="btn btn-default btn-sm">Non Code Type</button>
        </div>

    </div> 
    <div class="col-md-4">
        <div className="fontStyle">
            Number Of Questions
            <select value="" onChange="" className="selectpicker btn btn-labeled btn-start">
                <option value="">Select</option>
                <option value="">01</option>
                <option value="">02</option>
            </select>

            <span className="">
                <button type="button" class="btn btn-outline-primary btn-sm">Reset</button>
            </span>
            <span>
                <button type="button" class="btn btn-primary btn-sm">+</button>
            </span>

        </div>
    </div>

</div>

Answer №2

@media (max-width:767px) {
    .bg-light {
padding-bottom: 0 !important;
    }
    .bg-white {
background-color: #f8f9fa !important;
padding-bottom: 1rem !important;
    }
    .border-right:nth-child(n+2) {
    border: none !important;
    }
    }
    @media (max-width:991px) {
    .d-flex.border-right {
    border: none !important;
    }
    }
<div class="container">
    <div class="row my-5">
    <div class="col-md-10 col-lg-10 bg-light py-4">
    <div class="row px-2">
    <div class="d-flex align-items-center px-2 border-right mb-2 col-12 col-lg-4">
    <div class="border-right pr-2 mr-1"><p class="font-weight-bold mb-0 text-right w-100">1</p></div>
    <div class="w-100"><p class="font-weight-bold mb-0 mr-1">Choose Type</p></div>
    <div class="w-100">
    <select class="form-control">
  <option>None Selected</option>
</select>
</div>
    </div>
    <div class="d-flex align-items-center px-2 border-right mb-2 col-12 col-lg-5">
    <p class="w-100 font-weight-bold mb-0 mr-1">Choose Type</p>
    <p class="w-100 mb-0 mr-1"><a href="#" class="btn btn-block btn-primary">Code Type</a></p>
    <p class="w-100 mb-0"><a href="#" class="btn btn-block btn-outline-primary">Non Code Type</a></p>
    </div>
    <div class="d-flex justify-content-between align-items-center px-2 col-12 col-lg-3">
<div class="w-100"><p class="font-weight-bold mb-0 mr-2">Number of Types</p></div>
    <div class="w-100"><select class="form-control">
  <option>01</option>
</select></div>
    </div>
    </div>    
    </div>
    <div class="col-md-2 col-lg-2 bg-white py-2 d-md-flex align-items-center">
    <div class="d-md-block d-flex d-lg-flex justify-content-between">
    <div class="w-100 mr-1 mb-2"><button type="button" class="btn btn-block btn-lg btn-outline-primary">Reset</button></div>
    <div class="w-100"><button type="button" class="btn btn-block btn-lg btn-primary">+</button></div>
    </div>
    </div>
    </div>
    </div>

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

Showing data in a grid format on a webpage

I created a Java program that generates an array list with values such as Hi, Hello, How, Are, You, Me, They, and Them. In addition, I developed a basic controller to convert these values into JSON format and display them on localhost:8090/greeting like t ...

Creating a customized list item design using Bootstrap 3 and incorporating div elements

I have designed a custom li element with Bootstrap 3, but I am looking to achieve something specific. . Here is my current setup- HTML- <ul class="list-group"> <li class="list-group-item" id="baal"> <div style="display: inlin ...

Impact items without the need to individually assign a class to each item

Apologies if this question has already been answered elsewhere...I have been unable to find the solution, perhaps due to my lack of knowledge on how to phrase it. I am attempting to modify list items by setting a class for the ul, eliminating the need to ...

Peculiar redirection encountered while handling a form with checkbox option

When I try to submit the form in Chrome, the PHP file does not get called and I am redirected to another HTML page. However, in Firefox, when I select three checkboxes, it redirects me to that same HTML page as in Chrome. I even tried using radio buttons i ...

Displaying server errors in an Angular componentIn this tutorial, we

As I work on creating a registration page, my focus has been on posting data to the server. I have successfully implemented client-side and server-side validation mechanisms. Managing client-side errors is straightforward using code such as *ngIf="(emailAd ...

"Encountering an issue with the live preview feature in Br

Currently, I am working on a project offline and trying to make Brackets' live preview feature work smoothly. It has proven to be quite convenient for my tasks. While opening my project files using the "open file" option in Brackets, I encountered an ...

Assist the floats to "ascend" and occupy the available space

The screenshot showcases boxes that have been styled with "float: left". Is there a way to make these boxes float to the first available space in a column? For example, can we move the Music Nation box to the location indicated by the red arrow in the ima ...

Angular Error: Issue: Unable to locate the specified column ID within the TS file

Within my application, I have a table containing multiple columns. I am attempting to populate it with the appropriate data, but upon opening the page, I encounter the error Could not find column with id "PublishedParty", despite it being present ...

How can I stack two appbar components from Material Ui on top of each other without the vertical line separating them?

I am facing a challenge while trying to incorporate two AppBar components in Material-UI, stacked one on top of the other. The problem arises when a line appears at the end of the first AppBar, overlapping with the second one. Click here to view an image ...

What is the significance of the colon found within a VueJS/Vuetify/HTML component tag?

Incorporating Vuetify into my project has led me to this VueJS, Vuetify, or HTML inquiry. The component in question displays as follows: <v-list-tile v-for="item in menuItem.items" :key="item.type" :style="`background: ${item.colour}`" :h ...

Utilizing Capture Groups in CSS File for Regex Search and Replace

When it comes to extracting critical styles from a CSS file wrapped in a @critical rule, I run into some issues: @critical { .foo { ... } @media bar { ... } } The command I'm using for extraction involves sed search ...

What could be causing the "Cannot POST /api/" error to occur when attempting to submit a form?

Having issues with my basic website and struggling to find a solution. As a complete beginner in this field, I am stuck and need some guidance. Accessing http://localhost:3000/class/create works perfectly fine when running the server. However, trying to a ...

What is the best way to center my navigation bar without interfering with the mobile version's JavaScript functionality?

Just starting out with web development and stack overflow, so please bear with me if I struggle to explain the issue. I came across some JavaScript to make my website responsive on small screens (mobiles). However, I am having trouble centering my top nav ...

What could be the reason that data-bs-placement="right" is not functioning as expected?

I am facing an issue with the popover functionality in my project. No matter what value I set for data-bs-placement attribute, it does not display correctly. Can you help me understand why this is happening? <!DOCTYPE html> <html lang="en ...

fragment of the visual display

Are you aware that by utilizing the canvas tag in HTML5, it is possible to load a small portion of a large image with minimal load times? This can be advantageous when creating a game with just a few tiles but of considerable size, as it reduces the numb ...

A more concise validation function for mandatory fields

When working on an HTML application with TypeScript, I encountered a situation where I needed to build an error message for a form that had several required fields. In my TypeScript file, I created a function called hasErrors() which checks each field and ...

Troubles arise when trying to encapsulate a ReactJS embedded application with Material ui, causing issues with the

Currently, I am integrating a ReactJS application using Material UI styled components within a Wordpress page. To achieve this, I am utilizing webpack for transpilation of the JavaScript. After generating the bundle for the embedded version of the applica ...

Taking pictures with the camera in three.js on an iPhone

While working on a project that required capturing the camera video stream as a texture in three.js for mobile phones, I encountered an issue. The code I was using ran smoothly on Android devices but not on iPhones. Ideally, when the user grants permission ...

Title of the most recently created file on GitHub

Being new to web designing and javascript, I am seeking help in understanding how to display the latest PDF file in my small website hosted on GitHub. Despite successfully displaying a PDF file, I encountered difficulties when attempting to showcase the mo ...

Is there a way to view an HTML file in a separate window for preview?

Greetings, I have a situation in my application where I am storing HTML code in a string, like this: string myHtml = "<html><body><input type ='text' value='hello'/></body></html>"; My question is, how c ...