I am currently facing an issue with my code because I need to ensure that these tables are responsive for col-md-4, col-sm-6, and col-xs

I'm struggling to make my code responsive for different screen sizes. The default Bootstrap classes are not working properly and I need help fixing that. Instead of using divs, I have to work with tables. Can someone assist me in making my code responsive?

<div class="row text-center">
    <table class="responsive table">
        <tr class="container">
        <!-- child table 1 starts -->
            <td class="row responsive table">
                <table class="col-xs-12 col-sm-6">
                    <tbody class="logo-box">
                        <tr class="table winning-nbr-box winning-nbr">
                            <td class="winning-logo text-center">
                                <a href="https://www.lotterycorner.com/oh/pick-3-midday">
                                    <img src="./Ohio (OH) Lottery Results - Latest Winning numbers_files/oh-pick3.png" alt="Ohio  Pick 3 Midday Winning numbers" style="margin-top:40px;">
                                </a>
                                <p class="winning-inner">
                                    ...
                                </p>
                            </td>
                        </tr>
                    </tbody>    
                </table>
            </td>
            <!-- child table 1 ends -->
            <!-- child table 2 starts -->
            <td class="row responsive table">
                ...
            </td>
            <!-- child table 2 ends -->
            <!-- child table 3 starts -->
            <td class="row responsive table">
                ...
            </td>
            <!--child table3 ends-->
        </tr>
    </table>
</div>

Answer №1

As per the tables section on the Official Bootstrap Website, it is mentioned:

Responsive tables

To create responsive tables, simply wrap any .table in .table-responsive to enable horizontal scrolling on small devices (under 768px). No noticeable difference will be seen in these tables on screens wider than 768px.

It is worth noting that there is no class named .responsive.table,

Furthermore, achieving a responsive bootstrap table does not require the use of grid utilities. All you need to do is enclose the table within a container with .table-responsive and exclude the .row and .col classes for responsiveness.

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="table-responsive">
    <table class="table text-center">
        <tr class="container">
            <td class="table-responsive">
                <table class="table">
                    <tbody class="logo-box">
                        <tr class="table winning-nbr-box winning-nbr">

                            <td class="winning-logo text-center">
                                <a href="https://www.lotterycorner.com/oh/pick-3-midday">
                                        <img src="./Ohio (OH) Lottery Results - Latest Winning numbers_files/oh-pick3.png" alt="Ohio  Pick 3 Midday Winning numbers"
                                            style="margin-top:40px;">
                                    </a>
                                <p class="winning-inner">
                                    <p class="sort-text" style="border-bottom: 0px solid #fff;">
                                        <h3 style="font-size: 23px; color: #000; font-weight: 700; text-align:justify; padding:2px 20px; margin-top:-18px;">
                                            Pick 3 Midday
                                        </h3>
                                        <p class="upper-c-text" style="text-align:justify; padding:2px 20px; margin-top:-1px; color:#616161; font-size:14px;">Wednesday, December 20, 2017 Winning Number</p>

                                        <ul class="nbr-grp">
                                            <li> 8 </li>
                                            <li> 7 </li>
                                            <li> 3 </li>
                                        </ul>


                                        <span class="upper-c-text next" style="color:#616161;">
                                                <strong>Top Prize/ Jackpot</strong>
                                            </span>
                                        <br>
                                        <span class="current" style="color:#616161; font-size:20px;">$500</span>
                                        <p style="border:1px solid #ddd"></p>
                                        <p class="box-btm-part">
                                            <span style="color:#172d48;">Next Draw at : Thu, Dec-21-2017, 12:29 PM (US/Eastern )
                                                </span>
                                            <br>

                                            <span class="upper-c-text next" style="font-size:18px; line-height:24px;font-family: 'Neris-Light',sans-serif; color:#172d48;">
                                                    <strong>Next Jackpot</strong>
                                                </span>
                                            <br>
                                            <span class="price next" style="color:#172d48; font-size:26px;">
                                                    <strong>$500</strong>
                                                </span>
                                        </p>
                                        <p>
                                            <a href="https://www.lotterycorner.com/oh/pick-3-midday" class="result-btn">&nbsp;&#10095;&nbsp;&nbsp; Find Out More&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </a>
                                        </p>
                            </td>



                        </tr>

                    </tbody>
                </table>
            </td>
            ...
            <!-- The original content continues in this manner -->
        </tr>
    </table>
</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

Deactivate radio buttons when the table value is greater than or equal to one

On my webpage, there are radio buttons for 'Yes' and 'No'. When 'Yes' is selected, a hidden <div> appears where users can fill in fields. Upon clicking the 'Add' button, the information is displayed in a table. ...

Any tips for modifying my jQuery script so that a div smoothly tracks my cursor's movement?

My jQuery code creates a span in the shape of a circle following my cursor, but I saw another website that uses transform: translate() instead of top and left properties for smoother cursor movement. Can someone help me modify the code to use transform: tr ...

Angular: Dividing a web page with its individual controller

Exploring Angular Composition An individual new to Angular is eager to implement the concept of "composition," where the main page contains various smaller web page components. Starting off with just a Header section that binds perfectly. <html> &l ...

Generate spacing between rows of content in HTML or CSS without affecting the spacing between lines of text

In my R Markdown document in R, I want to replace the header labeled "Preface" with grey lines for visual indication. Here's the code snippet I've tried: :::{#preface} <p> Text </p> ::: However, there seems to be no margin at the beg ...

Storing a selected database column as a variable from an HTML page in Node.js with Express

My website showcases flight information pulled from a MySQL database. The process begins with a form where users select destinations and dates for their desired flight. Once the form is submitted, users are directed to another page where flights matching t ...

Angular js is a powerful framework that allows for the seamless transition of views, except for the home

I am currently using the ng-animate module to implement sliding effects for my app views. Each route has its own unique slide animation. Take a look at my simple code below: HTML: <div ng-view ng-animate class="slide"></div> CSS: /*Animatio ...

Creating a unique icon using Jquery Mobile for a button in a PhoneGap application

Has anyone experienced issues with using a custom icon for a jQuery mobile button? I am having trouble as it is only showing a grey circle instead of the actual icon. The default icons work fine, though. Here is the code snippet from the index.html page: ...

Error with adaptable menu

I am attempting to develop a responsive menu similar to the Bootstrap nav bar using only CSS. I have managed to get the functionality working, but the positioning of the menu grabber is incorrect and I'm unsure how to correct it. The grabber should al ...

Strengthening Cross-Site Scripting vulnerabilities: Understanding DOM related challenges

How can I resolve the issues with the last two lines? Sink: jQuery() Enclosing Method: handleFilter() Taint Flags: WEB, XSS function handleFilter(panelId, textFilterId) { var text = $('#' + textFilterId).val(); if(text === &ap ...

Select the five previous siblings in reverse order using jQuery's slice method

I have a unique approach to displaying a series of divs where only 5 are shown at a time using the slice() method. To navigate through the items, I include an ellipsis (...) link after every 4th item, which allows users to easily move on to the next set of ...

Padding located within a div tag

As a novice in the world of HTML and CSS, I have designed a birthday card with a desired 50/50 split down the center. Placing an image on the left side was successful, however when trying to add text to the right, it ended up too close to the center line. ...

The issue arises when trying to implement CSS keyframes with a CSS image slideshow

I'm currently troubleshooting a CSS slideshow that isn't functioning properly. The issue lies within the keyframes. I'm attempting to make the images come down from the top mask and then have the previous image go back up into the mask. This ...

Determining the location of nodes in relation to the grandparent

Within my HTML code, there is a table structure that includes header and body information. The goal is to extract the header information based solely on the row position within the table, without considering any parent nodes. Attempting to achieve this, I ...

Can you modify a WordPress/WooCommerce title written in uppercase to display in proper capitalization?

My current project is centered around WordPress and utilizes WooCommerce as its e-commerce platform. I recently migrated products from an old site where the product titles were written in uppercase. At the moment, my HTML code for the product titles looks ...

What values can be used for the CSS Property "padding-right-ltr-source"?

Currently, I am facing an issue with box padding specifically in Firefox. Upon inspecting the affected span element, I noticed a property called "padding-right-ltr-source" with the value "physical". Here is the snippet of code: >padding: 0px 15px; ...

A nifty little JavaScript tool

Recently, I created a bookmarklet that opens a new window with a specified URL and passes variables to a PHP script using the GET method. However, I now require it to load the same PHP script and pass the same variables but within a div element this time. ...

Implement varying styles in React components

In my React project, I am attempting to create a unique progress bar with custom styling. Specifically, I have a dynamically calculated percentage that I want to assign as the width of a div element. Initially, I tried achieving this using Tailwind CSS: &l ...

Issue with vertical alignment within nested divs

I have been attempting to center a search bar inside a top banner vertically. My understanding was that the following code could achieve this: #banner { height: 35px; width: 100%; } #searchbar { height: 15px; position: relative; top: 50%; ...

Is there a way to ensure that the height of my images matches exactly with its width?

Is there a way to ensure that the height of my images always matches their width? I need the height of the images to dynamically adjust and match the width, even when the window is resized. For example, if the image width is 500px, the height should also ...

Attempting to incorporate real-time search functionality into an input field

Looking to incorporate live search functionality in a text box, with the options being fetched from the server. If an item is not available, it should be added dynamically. For example, if typing "gre" and selecting that word, it should automatically be ad ...