`Arranging Widget Boxes in a Vertical Layout`

I am currently displaying each record with two boxes for Afternoon and Night horizontally:

https://i.stack.imgur.com/JMKug.png

This is the code structure I am using to achieve this layout:

<div id="record_box">
    <div class="row" style="padding-left: 10px; padding-right: 10px;">
        <div class="col-lg-6">
            <div class="widget style1 yellow-bg">
                <div class="row">
                    <div class="col-4">
                        <i class="fa fa-sun-o fa-4x"></i>
                    </div>
                    <div class="col-8 text-right">
                        <span> Afternoon Total Bets </span>
                        <h2 class="font-bold" id="afternoon"></h2>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-6">
            <div class="widget style1 lazur-bg">
                <div class="row">
                    <div class="col-4">
                        <i class="fa fa-moon-o fa-4x"></i>
                    </div>
                    <div class="col-8 text-right">
                        <span> Night Total Bets </span>
                        <h2 class="font-bold" id="night"></h2>
                    </div>
                </div>
            </div>
        </div>
    </div;

    ...

If I want to display each record vertically in a grid, where each block would be set as col-3, keeping maximum records fixed at 4. It should look like below:

https://i.stack.imgur.com/jhP6U.jpg

Answer №1

I have provided the basic structure for you, now feel free to make any necessary changes.

Customize with CSS:

.panel-box {
  -moz-transition: all .3s ease;
  -o-transition: all .3s ease;
  -webkit-transition: all .3s ease;
}

.panel-box .panel-heading {
  padding: 20px 10px;
  border: 1px solid rgba(86,61,124,.2);
}
.panel-box .panel-heading .fa {
  margin-top: 10px;
  font-size: 58px;
}
.panel-box .list-group-item {
  color: #777777;
  border-bottom: 1px solid rgba(250, 250, 250, 0.5);
}

.panel-box .panel-body {
  font-size: 20px;
  color: #777777;
  padding: 20px;
  margin: 0px;
  border: 1px solid rgba(86,61,124,.2);
}

Implement in HTML:

<div class="container">
    <div class="row">
      <div class="col-md-3 text-center">
          <div class="panel panel-box">
            <div class="panel-heading">
              <i class="fa fa-sun-o fa-4x"></i>
            </div>
            <div class="panel-body text-center">
              <span> Afternoon Total Bets </span>
              <h2 class="font-bold" id="afternoon"></h2>
            </div>
          </div>

          <div class="panel panel-box">
            <div class="panel-heading">
              <i class="fa fa-moon-o fa-4x"></i>
            </div>
            <div class="panel-body text-center">
              <span> Night Total Bets </span>
              <h2 class="font-bold" id="night"></h2>
            </div>
          </div>
      </div>
      <!-- Repeat div structure for more panels -->
    </div>
</div>

The output will look similar to the image here: https://i.stack.imgur.com/Mx2AI.png

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

Using jQuery, upon the page loading, the script will automatically trigger a

I am attempting to create an HTML file that automatically logs into my bank account. Below is the code I currently have: <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"> ...

Is Span responsible for creating a new line in this particular sentence?

I am struggling with aligning the following line of text that includes percentages like 100% and 99.8%. Is there a way to display all these elements in one line, side by side? <span style="font-size:12px;font-weight:bold;padding-left:800px;">99%& ...

Incomplete width allocation for the floating div positioned to the left

I've encountered an issue with the placement of the side-text div in relation to the image. Currently, without specifying the width of the side-text div, it automatically moves to the bottom. To address this problem, I attempted using display:inline- ...

Increasing the padding at the top of the logo when scrolling down the page

When scrolling down the page, there seems to be extra padding above the logo that is throwing off the alignment with the rest of the site. I've been trying different solutions to correct this issue: //$('.navbar-brand').css({ 'padding- ...

Retrieving HTML table data using PHP

In the scenario where I have an HTML form with a table like the one below: <form method="POST" action="a.php"> <table name="dataTable"> <tr> <td>row one col one</td> <td>row one col two</td> <td>row o ...

Make a big picture fit into a tiny container

I have a question about image rendering. What occurs when we try to fit a large image into a small container? Consider, for example, creating an HTML page with a 100x100 px image on a device with a pixel ratio of 2. Situation 1: Placing the image inside a ...

Using Reactjs: How do you insert HTML code into the primaryText of a list item?

Is it possible to include a span element inside a ListItem like so: <ListItem primaryText={"<span class='inner'>Some important info</span>" + item.title} /> When I view the rendered content, the output is not an HTML span ...

How can I resize an element using jQuery resizable and then revert it back to its original size with a button click?

I need help figuring out how to revert an element back to its original size after it has been modified with .resizable. I attempted the following: <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="//code. ...

Select the radio button by hovering the mouse over it

Is there a way to check my radio buttons when hovering over them without having to click? I want to display photos based on the selected radio button. I attempted this using JQuery, but I am still learning and consider myself a beginner. ...

Adjust the positioning of the background and create a smooth fade effect for

Is there a way to simultaneously change the background position and display an image in front of it? My current solution involves using a second div with padding to center it, but when I hover over the padding of the first div, the image does not change. ...

Issues with Jquery datatable causing column header to overlap the table header

I am facing an issue with my datatable as the table is not displaying correctly. Could someone advise me on how to troubleshoot and fix this problem? Below is the code snippet in question: $(tbName).dataTable({ "sScrollX": "100%", "sScro ...

Learn the process of transferring data-target IDs to another JSP using Bootstrap

Currently, I am encountering an issue where I am trying to use bootstrap to display a dialog box by clicking on a button. The dialog box is created in HTML (.jsp) and the submit button is in another .jsp file. However, when I click on the button, instead o ...

Can a time duration be applied to the background image of a DIV element?

Is there a way to set different time spans for background images of a DIV? Has anyone tried using jQuery for this task? I'm looking to have the first image displayed for 20 seconds, then switch to the second image for 5 seconds. Is it possible to ach ...

What strategies can be utilized to enhance the cleanliness of these functions?

Is there a way to avoid adding new lines of JS code every time I add a new image to the HTML? $(document).ready(function() { $('.btn').click(function() { var bid = $(this).attr('id'); if(bid=="img1" || bid == "img2" || bid == "img3"){ ...

Node.js error: HTML audio file returns 404 on server but plays fine when accessed directly as an HTML file

I'm facing an issue with an HTML page that contains an autoplay tag for a song (the file is in mp3 format). When I open the page as a local file on my Mac, the song plays fine. However, when I try to run it using a node.js file with socket.io, the son ...

Tips for maintaining the height of the outer div consistent with that of the inner div

I am encountering an issue with an inner div that is used for overlay and set to a min-height property. Despite changes in the overlay's height, the height of the outer div remains unaffected. #outer { width: 70px; height: 70px; background-co ...

What is the best way to create a seamless background transition for buttons on a mobile device?

Currently, I am working on my random quote generator project and I am trying to make it so that when the button is touched on a mobile device, the background color becomes semi-transparent. Below is the code I am using: #loadQuote { position: fixed; w ...

Attempting to Create a New User and Display the Resulting Page Using JavaScript and Handlebars Templates

I've implemented a form that allows users to input data. Once the user hits "Add User", they are successfully added to the database. However, instead of transitioning to the next page as expected, the form remains populated on the current page. The h ...

Fluid centering of DIV content both vertically and horizontally

Check out this example: When dealing with fluid divs, line height won't work as expected. My current code relies on line-height which doesn't work when the box sizes change. How can I ensure that a link (content) always appears perfectly centere ...

How to position a popup window perfectly in the center without having direct access to the popup code

Currently, I am faced with the challenge of using software that does not allow direct editing of HTML on individual pages. Instead, I have the ability to add code to the header and footer to make modifications to the content within the body of each page. ...